Skip to content

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

Compare
Choose a tag to compare
@aknysh aknysh released this 30 Oct 03:24
4c0f5db

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

Outputs:

codebuild_cache_bucket_arn = arn:aws:s3:::eg-test-ecs-codepipeline-build-vgxwmubjhtpk
codebuild_cache_bucket_name = eg-test-ecs-codepipeline-build-vgxwmubjhtpk
codebuild_project_id = arn:aws:codebuild:us-east-2:126450723953:project/eg-test-ecs-codepipeline-build
codebuild_project_name = eg-test-ecs-codepipeline-build
codebuild_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-codepipeline-build
codebuild_role_id = eg-test-ecs-codepipeline-build
codepipeline_arn = arn:aws:codepipeline:us-east-2:126450723953:eg-test-ecs-codepipeline-codepipeline
codepipeline_id = eg-test-ecs-codepipeline-codepipeline

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-codepipeline
ecs_cluster_id = arn:aws:ecs:us-east-2:126450723953:cluster/eg-test-ecs-codepipeline
ecs_exec_role_policy_id = eg-test-ecs-codepipeline-exec:eg-test-ecs-codepipeline-exec
ecs_exec_role_policy_name = eg-test-ecs-codepipeline-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-codepipeline
service_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-codepipeline-service
service_security_group_id = sg-05889fcb97794a7f5
task_definition_family = eg-test-ecs-codepipeline
task_definition_revision = 1
task_exec_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-codepipeline-exec
task_exec_role_name = eg-test-ecs-codepipeline-exec
task_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-codepipeline-task
task_role_id = AROAR24IM5RYQWUT5KJMW
task_role_name = eg-test-ecs-codepipeline-task
vpc_cidr = 172.16.0.0/16