Releases: cloudposse/terraform-provider-utils
Releases · cloudposse/terraform-provider-utils
1.2.0
Bump `atmos` to the latest version. Update tests @aknysh (#202)
what
- Bump
atmos
to the latest version - Update tests
- Use
namespace
context variable in the code that is used to returnremote-state
for a component in a stack
why
- For stacks config using multiple Orgs, we use
namespace
in stack names, and need to be able to find the remote state of the components provisioned in these stack
references
1.1.0
1.0.0
ATMOS-1.4.26: Update atmos and Go versions. Update tests @aknysh (#189)
what
- Update
atmos
to1.4.26
andGo
to1.19
- Update tests
why
- Keep up to date
- When searching for the specified component in the specified stack (e.g.
atmos describe component <component> -s <stack>
), if any of the stack config files throws error (which also means that we can't find the component in that stack), print the error to the console and continue searching for the component in the other stack config files. This will allow having partial stack configs even if a partial stack config file does not provide all the required context variables (namespace, tenant, environment, stage) for all components in it (but specifies the context for some components, which we are interested in) - Print the above misconfiguration errors to the console in logs verbose mode (
export ATMOS_LOGS_VERBOSE=true
) - An example of partial stacks definition:
examples/complete/stacks/orgs/cp/tenant1/dev/us-east-2-extras.yaml
defines a new componentnew-vpc
in the stacktenent1-ue2-dev
; note that the same stacktenent1-ue2-dev
is defined inexamples/complete/stacks/orgs/cp/tenant1/dev/us-east-2.yaml
but for different components
references
0.17.28
🚀 Enhancements
Bump `atmos` version. Update tests @aknysh (#184)
what
- Bump
atmos
version - Update tests
why
- When a component defines inherited YAML base components in
metadata.inherits
and the stack imported the YAML file(s) where the inherited YAML components are defined, add the imported YAML files to thedeps
labels - Before this fix, only the base terraform component was used in the
deps
calculation. All imported YAML files where the base YAML components were defined were not included in thedeps
labels (and the YAML files were missed from the Spacelift dependencies)
For example:
components:
terraform:
"test/test-component-override-3":
metadata:
component: "test/test-component"
inherits:
- "test/test-component-override"
- "test/test-component-override-2"
- "mixin/test-1"
- "mixin/test-2"
In the above config, test/test-component-override-3"
inherits test/test-component-override-2
YAML component.
Part of the config for test/test-component-override-2
YAML component is defined in service-1-override-2.yaml
file:
components:
terraform:
"test/test-component-override-2":
vars:
service_1_name: "service-1-override-2"
the service-1-override-2.yaml
file was not included in the deps
labels because the code only checked for the base terraform component test/test-component
in all imports.
After this fix, the code checks all imported files for the base terraform component and ALL base YAML components.
references
v0
Bump `atmos` version. Update tests (#184)
0.17.27
🚀 Enhancements
Update Go module versions. Refactor `stacks` to the latest pattern. Update `atmos.yaml`. Refactor tests @aknysh (#182)
what
- Update Go module versions
- Refactor
stacks
to the latest pattern - Refactor tests
- Update
atmos.yaml
why
- Use latest Go modules
- Refactor
stacks
in the examples to useorgs->tenants->accounts->regions
+catalog
andmixins
- this is our latest pattern of stacks configuration - Refactor tests to reflect the new structure of the
stacks
folder - Use the latest versions of
atmos.yaml
references
0.17.26
🚀 Enhancements
Update Golang to `1.18`. Update `atmos` to `1.4.22`. Add ENV vars to data sources @aknysh (#174)
what
- Update Golang to
1.18
- Update
atmos
to1.4.22
- Add ENV vars to data sources
why
- Use the latest Golang version, it offers many new features (including the
any
alias instead ofinterface{}
) - Update to the latest version of
atmos
to use the latest features and improvements - Add ENV vars to data sources - this will allow controlling the execution of
atmos
,utils
provider and terraform using externally set ENV vars
locals {
component = "test/test-component-override"
stack = "tenant1-ue2-dev"
tenant = "tenant1"
environment = "ue2"
stage = "dev"
env = {
ENVIRONMENT = local.environment
STAGE = local.stage
ATMOS_CLI_CONFIG_PATH = "."
}
}
data "utils_component_config" "example1" {
component = local.component
stack = local.stack
ignore_errors = false
env = local.env
}
- In particular, the latest
atmos
version supportsATMOS_CLI_CONFIG_PATH
ENV var to set the path toatmos.yaml
CLI config file. This ENV var will allow using themonorepo
pattern by loading a remote repo and pointing to itsatmos.yaml
usingATMOS_CLI_CONFIG_PATH
ENV var
module "monorepo" {
source = "git::ssh://[email protected]/ACME/infrastructure.git?ref=v0.0.1"
}
locals {
monorepo_local_path = "${path.module}/.terraform/modules/monorepo"
stack_config_local_path = "${local.monorepo_local_path}/stacks"
}
module "iam_roles" {
source = "git::ssh://[email protected]/ACME/infrastructure.git//components/terraform/account-map/modules/iam-roles?ref=v0.0.1"
env = {
ATMOS_CLI_CONFIG_PATH = "${path.module}/.terraform/modules/monorepo/rootfs/usr/local/etc/atmos"
}
}
references
0.17.25
🚀 Enhancements
Update to atmos 1.4.20 and tests @aknysh (#161)
what
- Update
atmos
1.4.20 and tests
why
- Use the code from the latest
atmos
version - Use the latest stack/component config and tests (Note that we copy the examples and all tests from
atmos
to theutils
provider to be able to run the same tests asatmos
)
references
0.17.24
🚀 Enhancements
0.17.23
🚀 Enhancements
Update `atmos` and tests @aknysh (#139)
what
- Update
atmos
and tests - Support dashes
-
in the tenant, environment and stage names
why
- The old
atmos
supported dashes in the names (because it was filename-based, not logical stack name based) - Some clients want to name tenants/environments/stages with dashes in the names (and some already have it, so we need to support that when converting from the old to the new
atmos
)