-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Implement warning message about resources being refreshed and the option to stop that #35062
Comments
Hi @EugenKon, Thanks for filing the issue. The Thanks! |
@jbardin This was described in the linked issue: #34962 (comment) So I just want to use a different Launch Template, but TF suggest to update other related resources. |
@EugenKon, it sounds like you have resources which are being managed both by Terraform, and manually outside of Terraform, which isn't something that Terraform was designed to handle. If these resources are not meant to be managed by Terraform, then it would be more appropriate to use a data source to read the existing state rather than trying to |
I understand that I can use additional options, but it would be nice (as was described in the linked issue) if TF could display hints about them. I also understand that it is better to manage everything in TF, but there are transition period and TF should not break other parts of a cluster during it. If it tries, the appropriate message should be displayed. It will help a lot to understand what is happening. |
Thanks for the extra context @EugenKon. Since we're probably not going to add warnings to |
Duplicate of #26812 |
@jbardin
At lease document that unexpected behaviour. From the following documentation https://developer.hashicorp.com/terraform/tutorials/state/resource-targeting I do not expect that terraform will change the resources other than targeted. That is easy to miss that more resources are changed and destroy something important occasionally, eg. This is good that terraform behaves as designed and as intended, but this should be properly documented or, at least, warning message is issued to not surprise your users. |
The reference documentation for
We can look into making a link back there more apparent from the tutorial you are looking at (the tutorials are developed separately from this repository). The ability to have a lower-level control from |
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. |
Terraform Version
Use Cases
It will be useful to prevent refresh of unwanted resources when
-target
option was used.Attempted Solutions
#34962 (comment)
Proposal
-target
option was used-target
options.Show the warning message with a list of resources need to be refreshed/updated and mention
-refresh=false
option. Eg.References
#34962 (comment)
The text was updated successfully, but these errors were encountered: