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

Adding ignore_changes lifecycle flag #2525

Merged
merged 1 commit into from Oct 14, 2015

Conversation

@robzienert
Copy link
Contributor

commented Jun 26, 2015

First stab at adding an "ignore_updates" lifecycle flag; addresses #2437.

@joekhoobyar

This comment has been minimized.

Copy link
Contributor

commented Jun 26, 2015

+1

@maxenglander

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2015

+1!

@JeanMertz

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2015

Yes! Just came looking for this after:

~ aws_eip.core
    instance: "i-92eeed5c" => ""

as I can't let Terraform manage this EIP.

@dalehamel

This comment has been minimized.

Copy link

commented Jul 24, 2015

👍

@dalehamel

This comment has been minimized.

Copy link

commented Jul 24, 2015

Unfortunately, doesn't seem to work:

* aws_route_table.subnet_routing_table.0: diffs didn't match during apply. This is a bug with Terraform and should be reported.

Maybe this is just an issue with resources with count?

@pmoust

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2015

Hi @robzienert , please have a look at #2018 (comment) where a meta-paremeter is proposed to ignore changes in targeted attributes of a resource.

@robzienert

This comment has been minimized.

Copy link
Contributor Author

commented Jul 27, 2015

@pmoust I like this a lot more. Not sure why I didn't see that issue when I was originally working on this PR. I'll work on getting this updated this coming weekend to use a list of properties, rather than being resource-level.

@berset

This comment has been minimized.

Copy link

commented Jul 30, 2015

Would love to see this feature! 👍

@robzienert robzienert force-pushed the robzienert:ignore-updates-lifecycle branch 2 times, most recently from 280cde2 to cba29f2 Aug 9, 2015

@robzienert

This comment has been minimized.

Copy link
Contributor Author

commented Aug 9, 2015

Finally got around to updating the PR. Right now it ignores attributes by their name, not state ID, but I would like to support both however I'm running into an issue with my implementation. For example:

I have a dynamic route on an aws_route_table resource. When defining a state ID, like route.1157028409 in aws_route_table, the route.# value stays the same, saying that a route is still being removed. Makes me think I'm evaling the diff in the wrong place.

@robzienert robzienert changed the title Adding ignore_updates lifecycle flag Adding ignore_changes lifecycle flag Aug 9, 2015

@robzienert robzienert force-pushed the robzienert:ignore-updates-lifecycle branch from cba29f2 to 9c0efe4 Aug 9, 2015

@phinze

This comment has been minimized.

Copy link
Member

commented Oct 7, 2015

@robzienert This is looking good! If you could add a covering unit test or two in our higher level context tests, I think this should be merge-able. Let me know if the tests are any trouble and one of us can help pick them up.

@robzienert

This comment has been minimized.

Copy link
Contributor Author

commented Oct 12, 2015

Welcome back @phinze. Will look into this - until then, do you have any feedback re my previous comment?

@phinze

This comment has been minimized.

Copy link
Member

commented Oct 12, 2015

Oh right! Sorry about missing that, @robzienert

Right now it ignores attributes by their name, not state ID, but I would like to support both however I'm running into an issue with my implementation.

I'm not sure we should expose the internals of state storage as an interface here. Why would you need to do this instead of just the attribute names?

Based on your example, it looks like you're trying to partially manage the routes on a route table? For that use case I think we should go for a separate aws_route resource.

@robzienert

This comment has been minimized.

Copy link
Contributor Author

commented Oct 12, 2015

Not exposing the state ID is fine, I was just thinking if people wanted to ignore an individual list item - but that would certainly be better suited with a join resource like aws_route. Good call.

@pmoust

This comment has been minimized.

Copy link
Contributor

commented Oct 13, 2015

Would love to see that landing in 0.6.4, thanks for your efforts

@robzienert robzienert force-pushed the robzienert:ignore-updates-lifecycle branch from 9c0efe4 to a1939e7 Oct 14, 2015

@robzienert

This comment has been minimized.

Copy link
Contributor Author

commented Oct 14, 2015

PR updated with a context test.

@phinze

This comment has been minimized.

Copy link
Member

commented Oct 14, 2015

Looks good! Thanks for all your work on this, @robzienert 🙇

phinze added a commit that referenced this pull request Oct 14, 2015

Merge pull request #2525 from robzienert/ignore-updates-lifecycle
Adding ignore_changes lifecycle flag

@phinze phinze merged commit b430b98 into hashicorp:master Oct 14, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@berset

This comment has been minimized.

Copy link

commented Oct 15, 2015

Finally :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.