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

Cycle Issue with template files after upgrade. #3812

Closed
jwaldrip opened this issue Nov 9, 2015 · 5 comments
Closed

Cycle Issue with template files after upgrade. #3812

jwaldrip opened this issue Nov 9, 2015 · 5 comments

Comments

@jwaldrip
Copy link
Contributor

jwaldrip commented Nov 9, 2015

I am getting the following error, this has only started to happen after upgrading to 0.6.6.

Error running plan: 3 error(s) occurred:

* Cycle: aws_autoscaling_group.deis-router, template_file.deis-router, aws_launch_configuration.deis-router, aws_launch_configuration.deis-router (destroy), template_file.deis-router (destroy)
* Cycle: template_file.deis-feature-worker (destroy), template_file.deis-feature-worker, aws_launch_configuration.deis-feature-worker, aws_autoscaling_group.deis-feature-workers, aws_launch_configuration.deis-feature-worker (destroy)
* Cycle: aws_launch_configuration.deis-production-worker, aws_autoscaling_group.deis-production-workers, aws_launch_configuration.deis-production-worker (destroy), template_file.deis-production-worker (destroy), template_file.deis-production-worker
@catsby
Copy link
Contributor

catsby commented Nov 9, 2015

Hey @jwaldrip – you don't have a pared down config that demonstrates this by chance, do you?

@jwaldrip
Copy link
Contributor Author

jwaldrip commented Nov 9, 2015

Check out http https://github.com/brandfolder/infrastructure. That's the config being used.

  • Jason

Jason Waldrip
Chief Technology Officer
Brandfolder.com
email| [email protected]
office |720-744-0311(tel:720-744-0311)
mobile |646-460-5959(tel:646-460-5959)

On Nov 9, 2015, 5:00 AM -0700, [email protected], wrote:

Hey@jwaldrip(https://github.com/jwaldrip)–you don't have a pared down config that demonstrates this by chance, do you?


Reply to this email directly orview it on GitHub(#3812 (comment)).

@apparentlymart
Copy link
Contributor

@jwaldrip I think this might be another case of the issue that was documented in #2944.

For example, your aws_autoscaling_group.deis-router depends on aws_launch_configuration.deis-router, and the latter is create_before_destroy but the former isn't. Setting them both to create_before_destroy (and possibly also your template_file.deis-router) might clear up the first of those three cycles. If that works, I expect the same sort of approach will fix the others.

This is a pretty common problem people have with Terraform; it's probably worth adding a special case to the cycle detector to detect and report this case in a more specific way. Ideally it would report it early before the resources are even created, rather than letting you create a bunch of stuff and then breaking later when you try to destroy parts of it.

@mitchellh
Copy link
Contributor

This is also probably fixed now magically with our automatic CBD upgrade we do to non-CBD resources. At least in this case!

omeid pushed a commit to omeid/terraform that referenced this issue Mar 30, 2018
r/autoscaling_group Add support for service linked roles
omeid pushed a commit to omeid/terraform that referenced this issue Mar 30, 2018
@ghost
Copy link

ghost commented Apr 18, 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 Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants