You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
terraform destroy fails when not all resources could be removed due to an error and the destroy command needs to be executed again. terraform destroy fails with this error:
╷
│ Error: Invalid index
│
│ on main.tf line 24, in locals:
│ 24: iam_instance_profile_arn = var.create_iam_instance_profile ? aws_iam_instance_profile.this[0].arn : var.iam_instance_profile_arn
│ ├────────────────
│ │ aws_iam_instance_profile.this is empty tuple
│
│ The given key does not identify an element in this collection value: the
│ collection has no elements.
╵
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
terraform destroy fails when not all resources could be removed due to an error and the destroy command needs to be executed again. terraform destroy fails with this error:
Versions
Module version [Required]: 6.5.3
Terraform version:
Terraform v1.3.4
on darwin_arm64
provider registry.terraform.io/hashicorp/aws v4.40.0
The text was updated successfully, but these errors were encountered: