Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to TF 0.12. Add tests. Add Codefresh test pipeline #27

Merged
merged 9 commits into from
Oct 30, 2019

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Oct 30, 2019

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

@aknysh aknysh requested a review from osterman October 30, 2019 02:34
@aknysh aknysh self-assigned this Oct 30, 2019
@aknysh aknysh merged commit 4c0f5db into master Oct 30, 2019
@aknysh aknysh deleted the terraform-0.12 branch October 30, 2019 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants