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

core: add wildcard (match all) support to ignore_changes #8599

Merged
merged 1 commit into from
Sep 2, 2016
Merged

core: add wildcard (match all) support to ignore_changes #8599

merged 1 commit into from
Sep 2, 2016

Conversation

svanharmelen
Copy link
Contributor

@svanharmelen svanharmelen commented Sep 1, 2016

One use case for supporting a wildcard feature like this, is for when you want to completely lock down a resource in an efficient way.

You can already protect it from being destroyed or recreated by using prevent_destroy, but if you also want to prevent it from being altered in any way after it has been initially created, you'll have to manually make sure you have included all the possible attributes that can be used (so not only the ones you have initially configured, but all attributes).

Of course it is much easier if in those cases you can just add a single entry with a * to "lock" the resource for all changes.

@@ -83,6 +83,10 @@ include `create_before_destroy`. Referencing a resource that does not include
~> **NOTE on ignore\_changes:** Ignored attribute names can be matched by their
name, not state ID. For example, if an `aws_route_table` has two routes defined
and the `ignore_changes` list contains "route", both routes will be ignored.
Additionally you can also use a single entry with a wildcard (e.g. `"*"`)
which will match all attribute names. Using a partial string together with a
wildcard (e.g. `"rout*"`) is **not** supported.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add on a validation to this field to enforce that * is only a valid character when it appears alone?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I guess it would be good to inform users to manage their expectations. So added a validation for this one.

@phinze
Copy link
Contributor

phinze commented Sep 2, 2016

LGTM!

@svanharmelen
Copy link
Contributor Author

Thanks for the review @phinze!

@svanharmelen svanharmelen merged commit 47dd1ad into hashicorp:master Sep 2, 2016
@svanharmelen svanharmelen deleted the f-ignore-changes-wildcard branch September 2, 2016 13:44
@ghost
Copy link

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

Successfully merging this pull request may close these issues.

2 participants