Skip to content

Releases: cloudposse/terraform-provider-utils

1.2.0

22 Sep 23:27
4afc016
Compare
Choose a tag to compare
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 return remote-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

14 Sep 17:36
bb97844
Compare
Choose a tag to compare
Bump `atmos` to the latest version @aknysh (#200)

what

  • Bump atmos to the latest version

why

  • Use many fixes and improvements in the atmos code

1.0.0

20 Aug 18:56
9870bc8
Compare
Choose a tag to compare
ATMOS-1.4.26: Update atmos and Go versions. Update tests @aknysh (#189)

what

  • Update atmos to 1.4.26 and Go to 1.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 component new-vpc in the stack tenent1-ue2-dev; note that the same stack tenent1-ue2-dev is defined in examples/complete/stacks/orgs/cp/tenant1/dev/us-east-2.yaml but for different components

references

0.17.28

17 Jul 16:05
ef20a63
Compare
Choose a tag to compare

🚀 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 the deps 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 the deps 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

24 Apr 18:26
ef20a63
Compare
Choose a tag to compare
v0
Bump `atmos` version. Update tests (#184)

0.17.27

11 Jul 14:18
c116d7f
Compare
Choose a tag to compare

🚀 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 use orgs->tenants->accounts->regions + catalog and mixins - 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

30 Jun 03:07
336b1a6
Compare
Choose a tag to compare

🚀 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 to 1.4.22
  • Add ENV vars to data sources

why

  • Use the latest Golang version, it offers many new features (including the any alias instead of interface{})
  • 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 supports ATMOS_CLI_CONFIG_PATH ENV var to set the path to atmos.yaml CLI config file. This ENV var will allow using the monorepo pattern by loading a remote repo and pointing to its atmos.yaml using ATMOS_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

04 Jun 17:20
d517ee2
Compare
Choose a tag to compare

🚀 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 the utils provider to be able to run the same tests as atmos)

references

0.17.24

16 May 20:34
2eccedd
Compare
Choose a tag to compare

🚀 Enhancements

Update `atmos` and tests @aknysh (#150)

what

  • Update atmos 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 the utils provider to be able to run the same tests as atmos)

references

0.17.23

23 Apr 02:58
2de09f8
Compare
Choose a tag to compare

🚀 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)

references