Skip to content

v1.4.8

Compare
Choose a tag to compare
@aknysh aknysh released this 18 Apr 14:58
· 214 commits to master since this release
803ec0f

what

  • Add metadata.terraform_workspace_pattern

why

  • We already have metadata.terraform_workspace using which we can specify/override the terraform workspace for a component
  • metadata.terraform_workspace_pattern introduces a pattern to override a terraform workspace for a component
      metadata:
        # Override Terraform workspace
        terraform_workspace: xxxxxxxxxxxxxxx
        terraform_workspace_pattern: "{tenant}-{environment}-{stage}-{component}"
  • The following tokens are supported in metadata.terraform_workspace_pattern:

    • {namespace}
    • {tenant}
    • {environment}
    • {stage}
    • {component}
    • {base-component}
  • This is useful to when converting YAML stack configs from the old atmos based on variant. In he old atmos, when a component: xxx attribute was specified for a component, it was considered as base component even if it was the same as the YAML component itself, in which case the terraform workspace for the component was calculated as <environment>-<stage>-<component>. The new atmos does not consider the same name for the component: attribute as a base component, which leads to the terraform workspace <environment>-<stage> (and hence Terraform not seeing the old workspace and wanting to re-create the component. To fix it, add terraform_workspace_pattern: "{environment}-{stage}-{component}" to the component's metadata