tftarget
tftarget copied to clipboard
Selecting multiple resources on destroy fails
When selecting more than one resource from the list, it fails to destroy as shown below:
My workaround is to select each resource individually then destroy one at a time.
$ tftarget destroy
? Select resources to target destroy: module.Stack.module.Compute.aws_instance.server[0] will be destroyed, module.Stack.module.Compute.aws_instance.server[1] will be destroyed
Enter a value: yes
â•·
│ Error: Invalid target "{module.Stack.module.Compute.aws_instance.server[0],module.Stack.module.Compute.aws_instance.server[1]}"
│
│ Must begin with a variable name.
╵
For more help on using this command, run:
terraform destroy -help
==============🎉 Selected Resources 🎉==============
module.Stack.module.Compute.aws_instance.server[0] will be destroyed
module.Stack.module.Compute.aws_instance.server[1] will be destroyed
$ tftarget --version ; terraform --version
tftarget version 0.0.2 (Built on 2023-05-30 11:50:17.568382767 +0100 BST m=+0.001186340)
Terraform v1.4.6
on linux_arm64
+ provider registry.terraform.io/datadog/datadog v3.23.0
+ provider registry.terraform.io/hashicorp/aws v4.64.0
+ provider registry.terraform.io/hashicorp/local v2.4.0
+ provider registry.terraform.io/hashicorp/null v3.2.1
+ provider registry.terraform.io/hashicorp/random v3.5.1
+ provider registry.terraform.io/hashicorp/tls v4.0.4
@jimsmith Thank you for your comment. If possible, could you paste the output when you run 'terraform plan' under that configuration setting?
@orangekame3 Unfortunately I can't do that as it's quite big and it's impossible to redact all confidential things and internal naming of resources,terraform plan
works fine.
@jimsmith Okay, I will check this issue. Thank you for your report.
Hi, @jimsmith please check latest version. #32