Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ENV vars to utils provider. Update utils provider versions #50

Merged
merged 2 commits into from
Jun 30, 2022

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Jun 30, 2022

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://git@github.com/ACME/infrastructure.git?ref=v0.0.1"
}

locals {
  monorepo_local_path = "${path.module}/.terraform/modules/monorepo"
}

module "iam_roles" {
  source  = "git::ssh://git@github.com/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

@aknysh aknysh requested review from a team as code owners June 30, 2022 03:56
@aknysh aknysh self-assigned this Jun 30, 2022
@aknysh
Copy link
Member Author

aknysh commented Jun 30, 2022

/test all

@aknysh
Copy link
Member Author

aknysh commented Jun 30, 2022

/test all

@aknysh aknysh added the patch A minor, backward compatible change label Jun 30, 2022
@aknysh aknysh merged commit be030f4 into main Jun 30, 2022
@aknysh aknysh deleted the update-remote-state branch June 30, 2022 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch A minor, backward compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants