Skip to content

v0.22.4

Compare
Choose a tag to compare
@cloudpossebot cloudpossebot released this 30 Jun 04:08
be030f4

🚀 Enhancements

Add ENV vars to `utils` provider. Update `utils` provider versions @aknysh (#50)

what

  • Add ENV vars to utils provider
  • Update utils provider versions

why

  • Allow controlling the execution of atmos, utils provider and terraform modules using ENV vars
module "remote_state" {
  source = "../../modules/remote-state"

  component = "test/test-component-override"
  stack     = "tenant1-ue2-dev"

  env = {
    ATMOS_CLI_CONFIG_PATH = path.module
  }

  context = module.this.context
}
  • In particular, the latest atmos and utils provider versions support 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"
}

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"
  } 
  
  depends_on = [module.monorepo]
}

references