MrAtheist
11/01/2025, 4:37 AMmodule.service_b.module.ec2 ...
module "service_a" {
source = "../modules/stuff"
...
}
module "service_b" {
source = "../modules/stuff"
...
}
...
# modules/stuff
module "ec2" {
source = "../modules/ec2"
}
...
... some more stuff
i thought this was pretty trivial until i step thru the tf plan, but i dont think this is doable by messing with hcl itself, instead...
terraform destroy --target module.service_b.module.ec2
terraform state rm module.service_b.module.ec2
any other suggestions...?Erik Osterman (Cloud Posse)
11/01/2025, 1:00 PMloren
11/01/2025, 3:31 PMremoved block, with the lifecycle.destroy option set to true (the default)...?
https://developer.hashicorp.com/terraform/language/block/removed#lifecycleMrAtheist
11/01/2025, 5:53 PMremoved block, seems kinda jank for something trivial, but i'll dig into it...loren
11/01/2025, 9:55 PMloren
11/01/2025, 9:56 PMMateusz Loskot
11/03/2025, 8:32 AMpaulm
11/07/2025, 12:56 AM