-
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
Meta-parameter: ignore_changes - list of attrs that should never trigger a diff #2018
Comments
I had mentioned this 2.5months ago but it got lost as it was part of another issue; #1120 (comment) |
+1 This would be very helpful. |
This will be of help for our deployments and in general resources managed by ASG. |
Hi @pmoust - I can't find an issue or an ML thread at the moment, but I believe this is an expression of a feature we've discussed previously as "ignore changes to an attribute". To clarify, are you talking about a Here's the config sketch for the "ignore changes" feature as I've thought about it, which will perhaps help to clarify if these two ideas are the same or not: resource "aws_instance" "foo" {
// ...
tags {
Name = "some-service"
}
// allow deploy processes to set other tags without generating a diff
ignore_changes = ["tags"]
} resource "aws_autoscaling_group" "bar" {
// ...
min_size = 3
max_size = 10
desired_capacity = 6
// i have an external tool that will manage these attrs after ASG creation
ignore_changes = ["min_size", "max_size", "desired_capacity"]
} |
Hi @phinze, I was talking about I don't see a way around it, perhaps someone could come up with a better idea. All in all, I think the sane way would be to go the route you describe, introducing a Still this needs a bit thinking especially if the mutable resources/attributes are exported and used to graph other nodes in state... P.S. For my use-case I ended introducing a |
Sounds good - I'm going to change the title here so this thread can track that feature. Feel free to chime in if you disagree. 👌 |
Mutable
attribute in schema struct
+1 this would be great. It would be really nice if you could specify specific vars to be ignored as well, e.g.
Curious if this feature is being worked on currently? Would love to take a stab at this but don't want to step on any toes. |
Also big 👍 to this as external management of resources is a real-world use-case that happens all the time in our infrastructure setup. |
@phinze: Hey ;) Is there any chance for this being in v0.6.0? |
There is also a pull request out there that is somewhat related, adding a |
Hey folks - alas we are locked down on core features for release of 0.6 - I'm excited to get this in though so I'll make sure we pick it up soon after release. 👍 |
👍 That makes sense, thanks! |
bump @phinze |
also having this issue, we are creating private subnets and want to manage their NAT routing tables with keepalived for an HA nat failover strategy. Everything works fine, except whenever you run an apply on the VPC it nukes the routing table because we can't ignore updates to the 'routes' block. So what I'd want to do is
|
+1 |
Hey @phinze , any chance for this being in v0.6.1 (or v0.6.2) ? |
Hey @phinze , any chance this goes with the next release ? |
Would love to have this in the next release. I have a use for it currently. We manage tags outside of Terraform, and this would ease use of TF. |
I would love to get this in also.. we manage ASGs outside of terraform and its a nightmare to keep the min/desired in the current state. |
Same situation with NAT and routing tables being reset. |
@engine07 for us we made the routes computed and optional in the route table to solve our problem (we compile terraform ourselves), and pulled in another PR that makes routes their own resource. This makes it behave more like a security groups and security group rules. |
Feature request satisfied in b430b98 ! |
We are using a Jenkins plugin to deploy a service onto AWS instances and the plugin would then create/update 'VERSION' tag for the instance(s). Unfortunately, Terraform deletes this tag unless there's a way to ignore it. Is there a way to ignore just a single tag, e.g. 'VERSION' as opposed to ignoring all tags for a specific instance? I'd really appreciate a response. Thanks |
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. |
I believe that we need to introduce
Mutable bool
in schema helper to mark resources' attributes that should be tracked in state but it's expected their value to change outside of terraform without affecting an execution plan.Example:
blue-green / canary deployment procedure involving AWS ASG / Internal ELBs / Route53 records,
aws_route53_record
--> mutable weight of recordsaws_elb
--> mutable instance ports, mutable health checkI am fairly sure this applies to other providers/resources.
If a descent disclaimer is present in the docs regarding what you 'give up' what you set an attribute as mutable I guess it is safe to add this feature.
Example syntax for ELB (very obvious)
Thoughts?
The text was updated successfully, but these errors were encountered: