Skip to content

Instantly share code, notes, and snippets.

@naturalett
Created November 7, 2022 17:14
Show Gist options
  • Save naturalett/175e0b2492090cb74e84d359c5490b02 to your computer and use it in GitHub Desktop.
Save naturalett/175e0b2492090cb74e84d359c5490b02 to your computer and use it in GitHub Desktop.
terragrunt/modules/eks/terragrunt.hcl
terraform {
# https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest
source = "tfr:///terraform-aws-modules/eks/aws?version=18.27.1"
after_hook "terragrunt-read-config" {
commands = ["apply"]
execute = ["bash", "./script.sh"]
}
extra_arguments "set_env" {
commands = ["apply"]
env_vars = {
CLUSTER_NAME = local.env_vars.locals.cluster_full_name
region_code = local.env_vars.locals.aws_region
cluster_name = local.env_vars.locals.cluster_name
account_id = local.env_vars.locals.account_id
}
}
}
locals {
env_vars = read_terragrunt_config(get_path_to_repo_root())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment