terragrunt.hcl 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. locals {
  2. environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
  3. partition_vars = read_terragrunt_config(find_in_parent_folders("partition.hcl"))
  4. region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))
  5. account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))
  6. global_vars = read_terragrunt_config(find_in_parent_folders("globals.hcl"))
  7. }
  8. terraform {
  9. # Double slash is intentional and required to show root of modules
  10. #source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/transit_gateway_interconnect_vpn?ref=v1.24.0"
  11. source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/terminated?ref=v1.24.10"
  12. }
  13. dependency "transit-gateway-hub" {
  14. config_path = "../008-transit-gateway-hub"
  15. }
  16. dependency "interconnect-instances" {
  17. config_path = local.account_vars.locals.interconnect_instances_path
  18. }
  19. # Include all settings from the root terragrunt.hcl file
  20. include {
  21. path = find_in_parent_folders()
  22. }
  23. # These are the variables we have to pass in to use the module specified in the terragrunt source above
  24. inputs = {
  25. # All of the inputs from the inherited hcl files are available automatically
  26. # (via the `inputs` section of the root `terragrunt.hcl`). However, modules
  27. # will be more flexible if you specify particular input values.
  28. name = "${local.partition_vars.locals.aws_partition_alias}-${local.environment_vars.locals.environment}"
  29. tags = {
  30. Purpose = "Transit Gateway VPN"
  31. Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
  32. }
  33. interconnect_public_ips = dependency.interconnect-instances.outputs.public_ips
  34. interconnect_private_ips = dependency.interconnect-instances.outputs.private_ips
  35. transit_gateway_id = dependency.transit-gateway-hub.outputs.tgw_id
  36. }
  37. terraform_version_constraint = "= 0.15.1"
  38. terragrunt_version_constraint = ">= 0.29, < 0.30"