terraform-aws-ecs-codepipeline
terraform-aws-ecs-codepipeline copied to clipboard
set enabled for codebuild module
Resolves https://github.com/cloudposse/terraform-aws-ecs-codepipeline/issues/101
/test all
@joe-niland can we try tests again?
/test all
Ok, should work now @joe-niland.
/test all
@mihaiplesa let's check that, but I think the test is going to keep failing due to duplicate bucket name. I'm looking at fixing the test now.
I've tested with https://github.com/cloudposse/terraform-aws-ecs-web-app/compare/master...mihaiplesa:terraform-aws-ecs-web-app:master and setting codebuild_enabled
to false
.
One last possible change would be to replace [0]
with .*.
.
/test terratest
Ugh, for using aws_s3_bucket_acl
we need AWS provider v4 and this module has >= 2.0
so we'd break compatibility if we merge this. Similar in https://github.com/cloudposse/terraform-aws-codebuild.
Can we just merge without aws_s3_bucket_acl
if the only broken tests are because of the deprecation warning?
@mihaiplesa yes, we can leave the deprecation warning in for this one. If you want to revert that, let's try again.
@joe-niland done.
/test all
@mihaiplesa all your issues are OK now, but the tests are still failing due to a bucket name collision. I'm fixing that in this PR but needs an approval before merging.
@mihaiplesa can you please merge master and then we'll try it again?
@joe-niland done.
/test terratest
/test bats
/test readme
Thanks @mihaiplesa we got there in the end!
Thank you as well. This is where it will actually be used https://github.com/cloudposse/terraform-aws-ecs-web-app/pull/210
@joe-niland This change seems like a no-op.
For future ref: The change here passed in enabled = module.this.enabled
but this is already passed in via the context.
https://github.com/mihaiplesa/terraform-aws-ecs-codepipeline/blob/f2b43ffedc30a7f4f7f57b59f9020b79fb3f8a83/main.tf#L239
@mihaiplesa please use the PR template.
If the above functionality does not have the intended effect without applying this change, then something else is very wrong...
@nitrocode thanks, I can see that now.
@mihaiplesa I should have asked you which codebuild resources were created when enabled
== false. Could you let us know if you still see the original issue?
Hmm I can't reproduce now which seems to be reassuring, it's been a while since this issue has been on my mind so I might be mixing things.
Also noticed now that module.this.enabled
if only passed where there is a count or a more complex conditional.
Do we want to revert this PR?