We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using the commands terraform state rm module.xxx child modules are not deleted.
terraform state rm module.xxx
Terraform v0.12.18 + provider.aws v2.42.0 + provider.random v2.2.1
My state looks like this:
$ terraform state list | grep app_stg02 module.app_stg02.data.aws_iam_policy_document.app_notification_queue module.app_stg02.aws_sqs_queue.app_notification_queue module.app_stg02.aws_sqs_queue_policy.app_notification_queue module.app_stg02.module.db.aws_security_group.main module.app_stg02.module.db.random_id.master_password module.app_stg02.module.db.random_id.snapshot_identifier module.app_stg02.module.db.module.rds.module.db_instance.data.aws_iam_policy_document.enhanced_monitoring module.app_stg02.module.db.module.rds_replica.module.db_instance.data.aws_iam_policy_document.enhanced_monitoring
This command deletes all state objects, including child modules: terraform state rm module.app_stg02
terraform state rm module.app_stg02
There is the child module still left in the state under the old name:
$ terraform state rm module.app_stg02 Removed module.app_stg02.data.aws_iam_policy_document.courier_notification_queue Removed module.app_stg02.aws_sqs_queue.courier_notification_queue Removed module.app_stg02.aws_sqs_queue_policy.courier_notification_queue $ terraform state list | grep app_stg02 module.app_stg02.module.db.aws_security_group.main module.app_stg02.module.db.random_id.master_password module.app_stg02.module.db.random_id.snapshot_identifier module.app_stg02.module.db.module.rds.module.db_instance.data.aws_iam_policy_document.enhanced_monitoring module.app_stg02.module.db.module.rds_replica.module.db_instance.data.aws_iam_policy_document.enhanced_monitoring
See above
The text was updated successfully, but these errors were encountered:
@hashibot this is a bug
Sorry, something went wrong.
@apparentlymart can we change the labels?
No branches or pull requests
When using the commands
terraform state rm module.xxx
child modules are not deleted.Terraform Version
Terraform Configuration Files
My state looks like this:
Expected Behavior
This command deletes all state objects, including child modules:
terraform state rm module.app_stg02
Actual Behavior
There is the child module still left in the state under the old name:
Steps to Reproduce
See above
The text was updated successfully, but these errors were encountered: