Skip to content
New issue

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

Dependencies not working when removing modules from terraform file #21630

Closed
mark-00 opened this issue Jun 6, 2019 · 1 comment · Fixed by #23252
Closed

Dependencies not working when removing modules from terraform file #21630

mark-00 opened this issue Jun 6, 2019 · 1 comment · Fixed by #23252
Labels
bug core v0.12 Issues (primarily bugs) reported against v0.12 releases

Comments

@mark-00
Copy link

mark-00 commented Jun 6, 2019

Terraform Version

Terraform v0.12.1
+ provider.stateful v1.1.0-linux-amd64

Terraform Configuration Files

main.tf

module "modA"   {
   source = "./modules/mod1"
   input = "test"
}


module "modB"  {
   source = "./modules/mod1"
   input = module.modA.output
}

./modules/mod1/main.tf

variable "input" {
  default = ""
}

resource "stateful_string"  "nuttige-resource" {
   desired = var.input
}

output "output" {
   value =  stateful_string.nuttige-resource.hash
}

Debug Output

Crash Output

Expected Behavior

When the modules are removed from the terrafrom file they should be deleted in the correct order. First modB then modA

Actual Behavior

When the modules are removed from the terrafrom file they are destoryed in a random order

Steps to Reproduce

create main.tf whith modA and modB
terrafrom apply
remove modA and modB from main.tf
terraform apply

do this a couple of times. The destroy order is random sometimes first modB sometimes first modA

Additional Context

When doing "terraform destroy" the depencies are taken into account

References

@hashibot hashibot added the v0.12 Issues (primarily bugs) reported against v0.12 releases label Aug 22, 2019
@ghost
Copy link

ghost commented Mar 29, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug core v0.12 Issues (primarily bugs) reported against v0.12 releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants