Skip to content

0.14.0 Convert to TF 0.12. Add tests. Add Codefresh test pipeline

Compare
Choose a tag to compare
@aknysh aknysh released this 06 Nov 18:46
54869f7

what

  • Port module to Terraform 0.12
  • Pin all providers
  • Add example for testing
  • Add bats and terratest for the example
  • Add Codefresh badge to point to the test pipeline in terraform-modules project
  • Update README

why

  • Module currently does not work with 0.12. Much easier syntax
  • Better regression control
  • Automatically test the example on every commit and pull request
  • Provision resources on AWS in the test account and check the outputs for the correct values
  • terraform-modules project contains pipelines for all terraform modules

related

test


alb_access_logs_bucket_id = eg-test-ecs-atlantis-alb-access-logs
alb_arn = arn:aws:elasticloadbalancing:us-east-2:126450723953:loadbalancer/app/eg-test-ecs-atlantis/189073b5f260cd5c
alb_arn_suffix = app/eg-test-ecs-atlantis/189073b5f260cd5c
alb_default_target_group_arn = arn:aws:elasticloadbalancing:us-east-2:126450723953:targetgroup/eg-test-ecs-atlantis-default/2f14e17b52cbe846
alb_dns_name = eg-test-ecs-atlantis-1537874245.us-east-2.elb.amazonaws.com
alb_http_listener_arn = arn:aws:elasticloadbalancing:us-east-2:126450723953:listener/app/eg-test-ecs-atlantis/189073b5f260cd5c/80c4525d2c0fad97
alb_ingress_target_group_arn = arn:aws:elasticloadbalancing:us-east-2:126450723953:targetgroup/eg-test-ecs-atlantis/24b711936eed556a
alb_ingress_target_group_arn_suffix = targetgroup/eg-test-ecs-atlantis/24b711936eed556a
alb_ingress_target_group_name = eg-test-ecs-atlantis

alb_listener_arns = [
  "arn:aws:elasticloadbalancing:us-east-2:126450723953:listener/app/eg-test-ecs-atlantis/189073b5f260cd5c/80c4525d2c0fad97",
]

alb_name = eg-test-ecs-atlantis
alb_security_group_id = sg-01b758fb67aa26302
alb_zone_id = Z3AADJGX6KTTL2

atlantis_ssh_public_key = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDhjwhAeeScaayMu+B8cJoe2c9WJ1F56spZ42EGJJiJnXZZJUxIjKxFRMMKvwY1SHJxh4Hkry25OpwvjG8uso+/TUtrqlhikLe45pk8oImUVCIqq1JTFgC+T3kgqCIpnSXC+94jP4bUqRUfLvKAaeZGAIbBjKfxdRgjw75CA+KZuXOpeVKiFDpkfy8Gp5GZHZMbc0XK9B8NN8X73r4fkZ9I7aYJFj9h4VovBIFCew7pdSG6D/aXxBHME1En6pv+Ao6GysCW+8idqgHNNNzy7/xYon/o/8MmUUIBjgvR0Om4VYYmt1BWOsKNkLpXOuXYjojo/7+RMzfuG+EvppuEsr9hzBayMWcEBMkopM7/brM+MVh2zbmtGkLTRsFYgQ4wmtOi/gS0yro+ATpkpT+Ldr+Arak0BO+QBlM6OaV50RWBMiYtBOFQYzwqkZ/G5oMieIUnAiEsatBqxI0ejy+214yXgAnqFp+DWyzogolBSFjEPx3wBAXQYSgsO9Jsnp50AHOBUI8jD13p5xx880W+fYDXA/kz9Vmw1h4ucqEj3XrqiYMuT36mWyMlrjfKNlNktXX7aHTiluDz+orhkeEeFYVSjbtARfzLQf+/MQLS3MaVYwcYNv5RlN1VqSpkafSgKb9t5WRxUcsw1PJlA3AMHZT3yna/o/ZbzwfezEtT3s6YeQ==

atlantis_url = https://ecs-atlantis-test.testing.cloudposse.co
atlantis_webhook_url = https://ecs-atlantis-test.testing.cloudposse.co/events
codebuild_badge_url =
codebuild_cache_bucket_arn = arn:aws:s3:::eg-test-ecs-atlantis-build-frrxevmbbnqk
codebuild_cache_bucket_name = eg-test-ecs-atlantis-build-frrxevmbbnqk
codebuild_project_id = arn:aws:codebuild:us-east-2:126450723953:project/eg-test-ecs-atlantis-build
codebuild_project_name = eg-test-ecs-atlantis-build
codebuild_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-atlantis-build
codebuild_role_id = eg-test-ecs-atlantis-build
codepipeline_arn = arn:aws:codepipeline:us-east-2:126450723953:eg-test-ecs-atlantis-codepipeline
codepipeline_id = eg-test-ecs-atlantis-codepipeline
codepipeline_webhook_id =
codepipeline_webhook_url = <sensitive>

container_definition_json = [{"command":null,"cpu":256,"dependsOn":null,"dnsServers":null,"dockerLabels":null,"entryPoint":null,"environment":[{"name":"ATLANTIS_ENABLED","value":"true"}],"essential":true,"firelensConfiguration":null,"healthCheck":null,"image":"cloudposse/default-backend:0.1.2","links":null,"logConfiguration":{"logDriver":"awslogs","options":{"awslogs-group":"eg-test-ecs-atlantis","awslogs-region":"us-east-2","awslogs-stream-prefix":"ecs-atlantis"},"secretOptions":null},"memory":512,"memoryReservation":128,"mountPoints":null,"name":"eg-test-ecs-atlantis","portMappings":[{"containerPort":4141,"hostPort":4141,"protocol":"tcp"}],"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":"ATLANTIS_ENABLED","value":"true"}],"essential":true,"firelensConfiguration":null,"healthCheck":null,"image":"cloudposse/default-backend:0.1.2","links":null,"logConfiguration":{"logDriver":"awslogs","options":{"awslogs-group":"eg-test-ecs-atlantis","awslogs-region":"us-east-2","awslogs-stream-prefix":"ecs-atlantis"},"secretOptions":null},"memory":512,"memoryReservation":128,"mountPoints":null,"name":"eg-test-ecs-atlantis","portMappings":[{"containerPort":4141,"hostPort":4141,"protocol":"tcp"}],"privileged":null,"readonlyRootFilesystem":false,"repositoryCredentials":null,"secrets":null,"startTimeout":30,"stopTimeout":30,"systemControls":null,"ulimits":null,"user":null,"volumesFrom":null,"workingDirectory":null}

ecr_registry_id = 126450723953
ecr_registry_url = 126450723953.dkr.ecr.us-east-2.amazonaws.com/eg-test-ecs-atlantis-ecr
ecr_repository_name = eg-test-ecs-atlantis-ecr
ecs_alarms_cpu_utilization_high_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-atlantis-cpu-utilization-high
ecs_alarms_cpu_utilization_high_cloudwatch_metric_alarm_id = eg-test-ecs-atlantis-cpu-utilization-high
ecs_alarms_cpu_utilization_low_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-atlantis-cpu-utilization-low
ecs_alarms_cpu_utilization_low_cloudwatch_metric_alarm_id = eg-test-ecs-atlantis-cpu-utilization-low
ecs_alarms_memory_utilization_high_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-atlantis-memory-utilization-high
ecs_alarms_memory_utilization_high_cloudwatch_metric_alarm_id = eg-test-ecs-atlantis-memory-utilization-high
ecs_alarms_memory_utilization_low_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-atlantis-memory-utilization-low
ecs_alarms_memory_utilization_low_cloudwatch_metric_alarm_id = eg-test-ecs-atlantis-memory-utilization-low
ecs_cloudwatch_autoscaling_scale_down_policy_arn = arn:aws:autoscaling:us-east-2:126450723953:scalingPolicy:c5fac2f9-635d-4c60-8017-bf515472c225:resource/ecs/service/eg-test-ecs-atlantis/eg-test-ecs-atlantis:policyName/eg-test-ecs-atlantis-down
ecs_cloudwatch_autoscaling_scale_up_policy_arn = arn:aws:autoscaling:us-east-2:126450723953:scalingPolicy:c5fac2f9-635d-4c60-8017-bf515472c225:resource/ecs/service/eg-test-ecs-atlantis/eg-test-ecs-atlantis:policyName/eg-test-ecs-atlantis-up
ecs_exec_role_policy_id = eg-test-ecs-atlantis-exec:eg-test-ecs-atlantis-exec
ecs_exec_role_policy_name = eg-test-ecs-atlantis-exec
ecs_service_name = eg-test-ecs-atlantis
ecs_service_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-atlantis-service
ecs_service_security_group_id = sg-019dabb7bf4279097
ecs_task_definition_family = eg-test-ecs-atlantis
ecs_task_definition_revision = 1
ecs_task_exec_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-atlantis-exec
ecs_task_exec_role_name = eg-test-ecs-atlantis-exec
ecs_task_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-atlantis-task
ecs_task_role_id = AROAR24IM5RYW7FFRDOQT
ecs_task_role_name = eg-test-ecs-atlantis-task
httpcode_elb_5xx_count_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-atlantis-elb-5xx-count-high
httpcode_elb_5xx_count_cloudwatch_metric_alarm_id = eg-test-ecs-atlantis-elb-5xx-count-high
httpcode_target_3xx_count_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-atlantis-3xx-count-high
httpcode_target_3xx_count_cloudwatch_metric_alarm_id = eg-test-ecs-atlantis-3xx-count-high
httpcode_target_4xx_count_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-atlantis-4xx-count-high
httpcode_target_4xx_count_cloudwatch_metric_alarm_id = eg-test-ecs-atlantis-4xx-count-high
httpcode_target_5xx_count_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-atlantis-5xx-count-high
httpcode_target_5xx_count_cloudwatch_metric_alarm_id = eg-test-ecs-atlantis-5xx-count-high

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",
]

target_response_time_average_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-atlantis-target-response-high
target_response_time_average_cloudwatch_metric_alarm_id = eg-test-ecs-atlantis-target-response-high
vpc_cidr = 172.16.0.0/16