Releases: cloudposse/terraform-provider-utils
0.17.22
🚀 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 downloadedkubeconfig
in the Terraformhelmfile
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
🚀 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 componentmetadata.terraform_workspace_pattern
introduces a pattern to override a terraform workspace for a componentmetadata: # 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 onvariant
. In he oldatmos
, when acomponent: 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 newatmos
does not consider the same name for thecomponent:
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, addterraform_workspace_pattern: "{environment}-{stage}-{component}"
to the component's metadatav1.4.7
what
- Take into account
init_run_reconfigure
CLI config and--init-run-reconfigure
command-line argument when runningatmos terraform init ...
commandwhy
atmos terraform init
must behave the same as all other commands that useinit_run_reconfigure
CLI config and--init-run-reconfigure
command-line argumentv1.4.6
what
- If
auto_generate_backend_file
istrue
(we are auto-generating backend files), removebackend.tf.json
when executingatmos terraform clean
commandwhy
- Useful when using different backends for the same component in different stacks
Commits
803ec0f
Addmetadata.terraform_workspace_pattern
(#138)a09ad46
Take into accountinit_run_reconfigure
CLI config and `--init-run-reconfigu...f983bc7
Ifauto_generate_backend_file
istrue
(we are auto-generating backend fil...- See full diff in compare view
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
0.17.19
🚀 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 forterraform 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
andterraform workspace
on abstract components creates terraform workspaces which is not needed
0.17.18
🚀 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 thestacks
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 thecontext
)
references
0.17.17
🚀 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.
Commits
- See full diff in compare view
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
🚀 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 inremote-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 forcomponent-Processor
which is used inremote-state
andbackend
references
0.17.15
🚀 Enhancements
Update `atmos`. Add `ignore_errors` input to `data_source_component_config` @aknysh (#105)
what
- Update
atmos
- Add
ignore_errors
input todata_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