terraform-aws-ecs-web-app
terraform-aws-ecs-web-app copied to clipboard
if exec is enabled, also enable init process
Seems PR template is ignored if I create PR from GitHub.dev
what
- set
initProcessEnabled = truein container definition if user has opted to enable ecs_exec (it is optional, but recommended by AWS)
why
- it will remove zombie processes in containers after exec is run
- because AWS recommended it
Tough to implement because both results of a conditional must be the same type, but container_definition module expects either the defined object as input variable, or null
Will be easier when defaults are released.
Would this work now?
@kevcube any movement on this one? Worth continuing or should we close it out?
@Gowiem this is ready for review
I based the optional/required state of parameters on this page https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-tmpfs.html
This also raises minimum terraform version to 1.3.0, not sure if we're ok with this (cc @nitrocode)
@nitrocode now that a decision has been made regarding updating terraform, can this be merged?
@kevcube can you run make init && make github/init locally, commit, and push? That'll fix the auto-format failure.
/test all
/test all
@kevcube there is a map() function call somewhere in the code. Mind hunting around for it so we can do the upgrade to 1.0?
/test all
@kevcube test failure 😔
TestExamplesComplete 2023-04-19T05:05:31Z retry.go:99: Returning due to fatal error: FatalError{Underlying: error while running command: exit status 1; ╷
│ Error: error creating S3 bucket ACL for eg-test-ecs-web-app-complete-333-alb-access-logs: AccessControlListNotSupported: The bucket does not allow ACLs
│ status code: 400, request id: 4KT6HD601B48BXYT, host id: 2z9g185BrZVK7LO2iQ4mkSgHyjXk2PCt3WxotqB5pX1f6qXdMGjpSA6bzZ+dFGZXaYvYfP0CKM8=
│
│ with module.alb.module.access_logs.module.s3_bucket.module.aws_s3_bucket.aws_s3_bucket_acl.default[0],
│ on .terraform/modules/alb.access_logs.s3_bucket.aws_s3_bucket/main.tf line 148, in resource "aws_s3_bucket_acl" "default":
│ 148: resource "aws_s3_bucket_acl" "default" {
│
╵}
apply.go:15:
Error Trace: apply.go:15
examples_complete_test.go:40
Error: Received unexpected error:
FatalError{Underlying: error while running command: exit status 1; ╷
@Gowiem yeah... I had this same error locally but it went away on second apply. It might be a race condition that requires a sleep, but it's deep in the module.alb.module.access_logs... might be due to amazon's recent global changes to S3 permissions
/test terratest
Seems breakage can be traced to here https://github.com/cloudposse/terraform-aws-s3-bucket/issues/174
After that is fixed, we will need to update terraform-aws-lb-s3-bucket, terraform-aws-alb, then finally update the test.