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 #10

Merged
merged 3 commits into from
Oct 31, 2019

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Oct 31, 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



Apply complete! Resources: 34 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}

cpu_utilization_high_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-cloudwatch-sns-alarms-cpu-utilization-high
cpu_utilization_high_cloudwatch_metric_alarm_id = eg-test-ecs-cloudwatch-sns-alarms-cpu-utilization-high
cpu_utilization_low_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-cloudwatch-sns-alarms-cpu-utilization-low
cpu_utilization_low_cloudwatch_metric_alarm_id = eg-test-ecs-cloudwatch-sns-alarms-cpu-utilization-low
ecs_cluster_arn = arn:aws:ecs:us-east-2:126450723953:cluster/eg-test-ecs-cloudwatch-sns-alarms
ecs_cluster_id = arn:aws:ecs:us-east-2:126450723953:cluster/eg-test-ecs-cloudwatch-sns-alarms
ecs_exec_role_policy_id = eg-test-ecs-cloudwatch-sns-alarms-exec:eg-test-ecs-cloudwatch-sns-alarms-exec
ecs_exec_role_policy_name = eg-test-ecs-cloudwatch-sns-alarms-exec
memory_utilization_high_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-cloudwatch-sns-alarms-memory-utilization-high
memory_utilization_high_cloudwatch_metric_alarm_id = eg-test-ecs-cloudwatch-sns-alarms-memory-utilization-high
memory_utilization_low_cloudwatch_metric_alarm_arn = arn:aws:cloudwatch:us-east-2:126450723953:alarm:eg-test-ecs-cloudwatch-sns-alarms-memory-utilization-low
memory_utilization_low_cloudwatch_metric_alarm_id = eg-test-ecs-cloudwatch-sns-alarms-memory-utilization-low

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-cloudwatch-sns-alarms
service_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-cloudwatch-sns-alarms-service
service_security_group_id = sg-0a841038ac859d842
task_definition_family = eg-test-ecs-cloudwatch-sns-alarms
task_definition_revision = 1
task_exec_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-cloudwatch-sns-alarms-exec
task_exec_role_name = eg-test-ecs-cloudwatch-sns-alarms-exec
task_role_arn = arn:aws:iam::126450723953:role/eg-test-ecs-cloudwatch-sns-alarms-task
task_role_id = AROAR24IM5RYUCXV7QQLU
task_role_name = eg-test-ecs-cloudwatch-sns-alarms-task
vpc_cidr = 172.16.0.0/16

@aknysh aknysh requested a review from osterman October 31, 2019 02:30
@aknysh aknysh self-assigned this Oct 31, 2019
@aknysh aknysh merged commit 29f4693 into master Oct 31, 2019
@aknysh aknysh deleted the terraform-0.12 branch October 31, 2019 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants