Skip to content

Releases: cloudposse/terraform-provider-utils

0.17.22

22 Apr 18:59
21903e5
Compare
Choose a tag to compare

🚀 Enhancements

Add `utils_aws_eks_update_kubeconfig` datasource @aknysh (#137)

what

  • Add utils_aws_eks_update_kubeconfig datasource

why

  • Download kubeconfig from EKS clusters and save it to a file using Terraform, then use the downloaded kubeconfig in the Terraform helmfile provider to provision helm charts with helmfiles
The data source can executes 'aws eks update-kubeconfig' commands in four different ways:

1. If all the required parameters (cluster name and AWS profile/role) are provided,
   then it executes the command without requiring the CLI config ('atmos.yaml') and component/stack/context.
   'atmos.yaml' is not required/needed in this case.

2. If 'component' and 'stack' are provided,
   then it executes the command using the atmos CLI config (see atmos.yaml) and the context by searching for the following settings:
     - 'components.helmfile.cluster_name_pattern' in 'atmos.yaml' CLI config (and calculates the '--name' parameter using the pattern)
     - 'components.helmfile.helm_aws_profile_pattern' in 'atmos.yaml' CLI config (and calculates the '--profile' parameter using the pattern)
     - 'components.helmfile.kubeconfig_path' in 'atmos.yaml' CLI config
     - the variables for the component in the provided stack
     - 'region' from the variables for the component in the stack

3. If the context ('tenant', 'environment', 'stage') and 'component' are provided,
   then it builds the stack name by using the 'stacks.name_pattern' CLI config from 'atmos.yaml', then performs the same steps as example #2.

4. Combination of the above. Provide a component and a stack (or context), and override other parameters (e.g. 'kubeconfig', 'region').

If 'kubeconfig' (the filename to write the kubeconfig to) is not provided, then it's calculated by joining
the base path from 'components.helmfile.kubeconfig_path' CLI config from 'atmos.yaml' and the stack name.

Supported inputs of the 'utils_aws_eks_update_kubeconfig' data source:
  - component
  - stack
  - tenant
  - environment
  - stage
  - cluster_name
  - kubeconfig
  - profile
  - role_arn
  - alias
  - region

references

0.17.21

20 Apr 18:07
62f2adb
Compare
Choose a tag to compare

🚀 Enhancements

Bump github.com/cloudposse/atmos from 1.4.5 to 1.4.8 @dependabot (#136)

Bumps github.com/cloudposse/atmos from 1.4.5 to 1.4.8.

Release notes

Sourced from github.com/cloudposse/atmos's releases.

v1.4.8

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

v1.4.7

what

  • Take into account init_run_reconfigure CLI config and --init-run-reconfigure command-line argument when running atmos terraform init ... command

why

  • atmos terraform init must behave the same as all other commands that use init_run_reconfigure CLI config and --init-run-reconfigure command-line argument

v1.4.6

what

  • If auto_generate_backend_file is true (we are auto-generating backend files), remove backend.tf.json when executing atmos terraform clean command

why

  • Useful when using different backends for the same component in different stacks
Commits
  • 803ec0f Add metadata.terraform_workspace_pattern (#138)
  • a09ad46 Take into account init_run_reconfigure CLI config and `--init-run-reconfigu...
  • f983bc7 If auto_generate_backend_file is true (we are auto-generating backend fil...
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

0.17.20

14 Apr 20:16
412f0ec
Compare
Choose a tag to compare

🚀 Enhancements

Update `atmos`. Update docs. Update example and tests @aknysh (#132)

what

  • Update atmos
  • Update docs
  • Update example and tests

why

  • Latest atmos has many new features, bug fixes and improvements
  • Use the latest tests from atmos
  • Keep the docs up to date

references

0.17.19

05 Apr 02:57
8f77b60
Compare
Choose a tag to compare

🚀 Enhancements

Update `atmos`. Add `init_run_reconfigure` CLI config. Update `stack_name_pattern` @aknysh (#124)

what

  • Update atmos
  • Add init_run_reconfigure CLI config
  • Update stack_name_pattern

why

  • init_run_reconfigure CLI config allows enabling/disabling the -reconfigure argument for terraform init when running it before running other terraform commands
  • Don't use the default stack_name_pattern because it used {tenant} which is not available for all clients
  • Running terraform plan and terraform workspace on abstract components creates terraform workspaces which is not needed

0.17.18

04 Apr 19:42
9f86ae6
Compare
Choose a tag to compare

🚀 Enhancements

Update `atmos`. Update tests @aknysh (#123)

what

  • Update atmos
  • Update tests

why

  • settings.spacelift.stack_name_pattern allows overriding Spacelift stack names. Supported tokens: {namespace}, {tenant}, {environment}, {stage}, {component}
components:
  terraform:
    "test/test-component-override-2":
      settings:
        spacelift:
          workspace_enabled: true
          # `stack_name_pattern` overrides Spacelift stack names
          # By specifying the following `stack_name_pattern`, the final Spacelift stack name will be
          # `tenant1-ue2-dev-new-component` instead of `tenant1-ue2-dev-test-test-component-override-2`
          # By default (if `stack_name_pattern` is not specified), the stack name is generated using the pattern {tenant}-{environment}-{stage}-{component}
          # Supported tokens: {namespace}, {tenant}, {environment}, {stage}, {component}
          stack_name_pattern: "{tenant}-{environment}-{stage}-new-component"

If the stack name pattern is specified incorrectly or not specific enough, an error like this will be thrown:

Duplicate Spacelift stack name 'tenant2-ue2-new-component' for component 'test/test-component-override-2' in the stack 'tenant2/ue2/prod'.
Check if the component name is correct and the Spacelift stack name pattern 'stack_name_pattern={tenant}-{environment}-new-component' is specific enough.
Did you specify the correct context tokens {namespace}, {tenant}, {environment}, {stage}, {component}?
  • When a stack name on the command line (e.g. atmos terraform plan test/test-component -s tenant1-ue2-dev) was the same as the name of the YAML config file in a subfolder inside the stacks folder, the stack was incorrectly detected (throwing an error "The stack 'xxx' does not exist") because it was considered as the folder path and not as a logical stack name (which is detected from the context)

references

0.17.17

22 Feb 15:46
78907b8
Compare
Choose a tag to compare

🚀 Enhancements

Bump github.com/cloudposse/atmos from 1.3.28 to 1.3.29 @dependabot (#110)

Bumps github.com/cloudposse/atmos from 1.3.28 to 1.3.29.

Release notes

Sourced from github.com/cloudposse/atmos's releases.

v1.3.29

what & why

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

0.17.16

21 Feb 17:27
5ac59e4
Compare
Choose a tag to compare

🚀 Enhancements

Update `atmos`. Update tests @aknysh (#109)

what

  • Update atmos
  • Update tests

why

  • Terraform workspace for remote state for derived components in subfolders was calculated differently from the terraform state for atmos terraform commands (leading to errors/failures in remote-state.tf for derived components in subfolders
  • Use the same code to calculate terraform workspace for all CLI commands: terraform plan/apply, describe component, and for component-Processor which is used in remote-state and backend

references

0.17.15

12 Feb 21:01
32b325c
Compare
Choose a tag to compare

🚀 Enhancements

Update `atmos`. Add `ignore_errors` input to `data_source_component_config` @aknysh (#105)

what

  • Update atmos
  • Add ignore_errors input to data_source_component_config

why

  • Use latest code from atmos with new features and bug fixes
  • data_source_component_config is used to read remote state of components. Sometimes we want to ignore errors if a component does not exist in a stack and just return an empty value

references

0.17.14

29 Jan 03:05
b0cc6f4
Compare
Choose a tag to compare

🚀 Enhancements

Update `atmos`, rebuild provider docs @aknysh (#102)

what

  • Update atmos, rebuild provider docs

why

  • Use latest code from atmos
  • New data sources were added, but the provider docs have not been rebuilt

0.17.13

27 Jan 20:14
85a1061
Compare
Choose a tag to compare

🚀 Enhancements

Update `atmos`, stacks and tests @aknysh (#100)

what

  • Update atmos, stacks and tests

why

  • Keep up to date
  • atmos improvements and bug fixes

references