Skip to content

Instantly share code, notes, and snippets.

@richardjkendall
Created February 12, 2020 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardjkendall/0447288618fc72feb1c4d37b9361704b to your computer and use it in GitHub Desktop.
Save richardjkendall/0447288618fc72feb1c4d37b9361704b to your computer and use it in GitHub Desktop.
Terragrunt/terraform code for deploying ecs-haproxy service
aws_region = "AWS_REGION"
cluster_name = "ECS_CLUSTER_NAME"
service_name = "haproxy"
tag_name = "latest"
default_domain = "null.example.com"
service_registry_id = "ns-BLAH"
namespace_map = [
{
namespace = "cluster.blah.local"
domainname = "example.com"
}
]
lb_subnets = [
"LIST_OF_SUBNETS"
]
vpc_id = "VPC_ID"
memory = 128
listener_cert_arn = "CERTIFICATE_ARN"
root_domain = "ROOT_DOMAIN_FOR_ALB_ENDPOINT"
host_name = "HOST_NAME_FOR_ALB_ENDPOINT"
prom_password_ssm_secret = "/haproxy/dev/prom_passwd"
stats_password_ssm_secret = "/haproxy/dev/stats_passwd"
terraform {
source = "github.com/richardjkendall/tf-modules.git//modules/ecs-haproxy?ref=v24"
extra_arguments "custom_vars" {
commands = get_terraform_commands_that_need_vars()
# With the get_terragrunt_dir() function, you can use relative paths!
arguments = [
# remember to change your paths...
"-var-file=${get_terragrunt_dir()}/../../../common/common.tfvars",
"-var-file=${get_terragrunt_dir()}/terraform.tfvars"
]
}
}
include {
path = find_in_parent_folders()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment