Skip to content

Allow magic variables in variable validationΒ #27574

@SizZiKe

Description

@SizZiKe

Current Terraform Version

0.14.5

Use-cases

  • Constraining variables against Terraform workspaces
  • Constraining variables against content in configuration files, e.g. ensuring a value exists in a YAML or JSON file within the module directory

Attempted Solutions

  • no workarounds for terraform.workspace
  • path.module can be omitted when referencing a file but can lead to unexpected results if the module doesn't lie within the working directory

Proposal

The good references check should exempt magic variables (path.*, terraform.workspace, etc.)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions