Terraform module which implements an ECS service which exposes a web service via ALB.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by aknysh almost 5 years ago
bats
and terratest
for the exampleterraform-modules
projectterraform-modules
project contains pipelines for all terraform modulesApply complete! Resources: 1 added, 0 changed, 0 destroyed.
Outputs:
container_definition_json = [{"command":null,"cpu":256,"dependsOn":null,"dnsServers":null,"dockerLabels":null,"entryPoint":null,"environment":[{"name":"false_boolean_var","value":"false"},{"name":"integer_var","value":"42"},{"name":"string_var","value":"I am a string"},{"name":"true_boolean_var","value":"true"}],"essential":true,"firelensConfiguration":null,"healthCheck":null,"image":"cloudposse/geodesic","links":null,"logConfiguration":null,"memory":256,"memoryReservation":128,"mountPoints":null,"name":"geodesic","portMappings":[{"containerPort":80,"hostPort":80,"protocol":"tcp"},{"containerPort":443,"hostPort":443,"protocol":"udp"}],"privileged":null,"readonlyRootFilesystem":false,"repositoryCredentials":null,"secrets":null,"startTimeout":30,"stopTimeout":30,"systemControls":null,"ulimits":null,"user":null,"volumesFrom":null,"workingDirectory":null}]
container_definition_json_map = {"command":null,"cpu":256,"dependsOn":null,"dnsServers":null,"dockerLabels":null,"entryPoint":null,"environment":[{"name":"false_boolean_var","value":"false"},{"name":"integer_var","value":"42"},{"name":"string_var","value":"I am a string"},{"name":"true_boolean_var","value":"true"}],"essential":true,"firelensConfiguration":null,"healthCheck":null,"image":"cloudposse/geodesic","links":null,"logConfiguration":null,"memory":256,"memoryReservation":128,"mountPoints":null,"name":"geodesic","portMappings":[{"containerPort":80,"hostPort":80,"protocol":"tcp"},{"containerPort":443,"hostPort":443,"protocol":"udp"}],"privileged":null,"readonlyRootFilesystem":false,"repositoryCredentials":null,"secrets":null,"startTimeout":30,"stopTimeout":30,"systemControls":null,"ulimits":null,"user":null,"volumesFrom":null,"workingDirectory":null}
ecs_cluster_arn = arn:aws:ecs:us-east-2:126450723953:cluster/eg-test-ecs-alb-service-task
ecs_cluster_id = arn:aws:ecs:us-east-2:126450723953:cluster/eg-test-ecs-alb-service-task
ecs_exec_role_policy_id = eg-test-ecs-alb-service-task-exec:eg-test-ecs-alb-service-task-exec
ecs_exec_role_policy_name = eg-test-ecs-alb-service-task-exec
private_subnet_cidrs = [
"172.16.0.0/19",
"172.16.32.0/19",
]
public_subnet_cidrs = [
"172.16.96.0/19",
"172.16.128.0/19",
]
service_name = eg-test-ecs-alb-service-task
service_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-alb-service-task-service
service_security_group_id = sg-00c87f151c0393e7d
task_definition_family = eg-test-ecs-alb-service-task
task_definition_revision = 1
task_exec_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-alb-service-task-exec
task_exec_role_name = eg-test-ecs-alb-service-task-exec
task_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-alb-service-task-task
task_role_id = AROAR24IM5RYQGCHM4V3M
task_role_name = eg-test-ecs-alb-service-task-task
vpc_cidr = 172.16.0.0/16
Published by aknysh about 5 years ago
load_balancer
configs are supportedPublished by aknysh about 5 years ago
Published by aknysh over 5 years ago
deployment_controller
optiondeployment_controller
to enable support for CodeDeploy integration. This further enables the ability to use Blue/Green deployments via CodeDeployPublished by aknysh over 5 years ago
assign_public_ip
variableprivate_subnet_ids
to subnet_ids
because it was misleading - public subnet ids can also be setPublished by aknysh over 5 years ago
"aws_security_group" "ecs_service"
name
in "aws_security_group" "ecs_service"
. Since the default label was used without any additional attributes to disambiguate the names, when deploying the cluster, there were errors that a Security Group with the same name already existed. For the Security Group for the ECS service, should use the service_label
Published by aknysh over 5 years ago
Published by aknysh over 5 years ago
Allows to add volume definitions to task like this
module "alb_service_task" {
source = "../terraform-aws-ecs-alb-service-task"
volumes = [
{
name = "${module.label_base.id}-data"
docker_volume_configuration = [
{
scope = "shared"
autoprovision = true
},
]
},
]
}
Published by joshmyers almost 6 years ago
Published by aknysh almost 6 years ago
Published by aknysh about 6 years ago
Published by vadim-hleif about 6 years ago
README.md
Published by sarkis about 6 years ago