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

Consider making utils_deep_merge_* local-only data sources #58

Open
timcosta opened this issue Sep 15, 2021 · 1 comment
Open

Consider making utils_deep_merge_* local-only data sources #58

timcosta opened this issue Sep 15, 2021 · 1 comment

Comments

@timcosta
Copy link

Describe the Feature

Currently utils_deep_merge_yaml and utils_deep_merge_json are implemented as normal data sources, not local-only data sources. This causes changes to the yaml files on disk to not take effect when running something like a terraform import which loads the cached result from state.

Expected Behavior

These data sources that merge strings should be local-only data sources so that the result is re-computed every time rather than cached.

Use Case

We use yaml files to store some configuration. We flipped a boolean there that allows us to import a Route53 hosted zone, but are getting errors during the import but not during the plan because the import is using the cached merge rather than re-evaluating the new boolean. This also is present during the usage of terraform console.

Describe Ideal Solution

Ideal solution would be to make these local-only data sources so that the result is re-computed every time.

Alternatives Considered

I ran tf apply -target=data.utils_deep_merge_yaml.environment_config which reported no changes but updated the value in state, which allowed the next import to succeed.

@gthieleb
Copy link

gthieleb commented Mar 9, 2022

did you try to update the state with apply -refresh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants