Skip to content

Consider making utils_deep_merge_* local-only data sources #58

@timcosta

Description

@timcosta

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions