terragrunt.hcl 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Backup of the terragrunt.hcl
  2. # Originally found in ~/xdr-terraform-live/test/aws-us-gov/mdr-test-c2/087-aws-client-vpn
  3. locals {
  4. # If you want to use any of the variables in _this_ file, you have to load them here.
  5. # However, they will all be available as inputs to the module loaded in terraform.source
  6. # below.
  7. environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
  8. partition_vars = read_terragrunt_config(find_in_parent_folders("partition.hcl"))
  9. region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))
  10. account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))
  11. global_vars = read_terragrunt_config(find_in_parent_folders("globals.hcl"))
  12. }
  13. # Terragrunt will copy the Terraform configurations specified by the source parameter, along with any files in the
  14. # working directory, into a temporary folder, and execute your Terraform commands in that folder.
  15. terraform {
  16. # Double slash is intentional and required to show root of modules
  17. source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/aws_client_vpn?ref=v5.2.3"
  18. }
  19. dependency "vpc-access" {
  20. config_path = "../010-vpc-access"
  21. }
  22. # Include all settings from the root terragrunt.hcl file
  23. include {
  24. path = find_in_parent_folders()
  25. }
  26. # These are the variables we have to pass in to use the module specified in the terragrunt source above
  27. inputs = {
  28. # All of the inputs from the inherited hcl files are available automatically
  29. # (via the `inputs` section of the root `terragrunt.hcl`). However, modules
  30. # will be more flexible if you specify particular input values.
  31. tags = {
  32. Purpose = "VPN - Employee Access"
  33. Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
  34. }
  35. dns_name = "vpn" # TODO: Fix this when actual swap is taking place.
  36. vpc_id = dependency.vpc-access.outputs.vpc_id
  37. azs = dependency.vpc-access.outputs.azs
  38. private_subnets = dependency.vpc-access.outputs.private_subnets
  39. public_subnets = dependency.vpc-access.outputs.public_subnets
  40. split_tunnel = false
  41. log_level = "INFO" # (CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET)
  42. module_log_level = "INFO" # (CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET)
  43. }
  44. terraform_version_constraint = "= 1.1.6"
  45. terragrunt_version_constraint = "= 0.36.2"