terraform-aws-couchbase
terraform-aws-couchbase copied to clipboard
Explicit dependency of the https_listener_ports templates on the list https_listener_ports_and_certs
As mentioned in https://github.com/gruntwork-io/terraform-aws-couchbase/issues/52 , terraform seems to have trouble updating the template files if the upstream list https_listener_ports_and_certs (used to generate the templates) changes.
This change states the dependency explicitely and fixes the issue: each time the list changes, the templates are regenerated as well as all downstream dependencies.
Thanks for the PR! Could you add a comment above that
depends_on
block with a short explanation and link to this PR so future maintainers know why it's there?
I updated the PR.
Thanks! I'll kick off tests now.
Test failed with error "project not found". Not sure it is related to my changes... If I were to add tests for this PR, where should that be?
Hm, looks like 3 of the tests are failing on terraform destroy
:
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:28Z command.go:158: [0m[1mmodule.load_balancer.aws_route53_record.load_balancer[0]: Refreshing state... [id=Z2AJ7S3R6G9UYJ_single-cluster-lnlqxn.gruntwork.in_A][0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [31m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [1m[31mError: [0m[0m[1mError in function call[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158:
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m on ../../modules/load-balancer/outputs.tf line 36, in output "https_listener_arns":
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: 36: value = [4mzipmap([0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m 37: [4m[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m 38: [4m[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m 39: [4m[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m [90m|----------------[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m [90m|[0m [1maws_alb_listener.https[0m is tuple with 2 elements[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m [90m|[0m [1mdata.template_file.https_listener_ports[0m is empty tuple[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: Call to function "zipmap" failed: number of keys (0) does not match number of
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: values (2).
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [31m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [1m[31mError: [0m[0m[1mError in function call[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158:
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m on ../../modules/load-balancer/outputs.tf line 45, in output "all_listener_arns":
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: 45: [4mzipmap([0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m 46: [4m[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m 47: [4m[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m 48: [4m[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m [90m|----------------[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m [90m|[0m [1maws_alb_listener.https[0m is tuple with 2 elements[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m [90m|[0m [1mdata.template_file.https_listener_ports[0m is empty tuple[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: Call to function "zipmap" failed: number of keys (0) does not match number of
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: values (2).
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z command.go:158: [0m[0m
TestIntegrationCouchbaseCommunitySingleClusterDnsTlsUbuntu18 2019-12-12T16:06:29Z retry.go:80: Returning due to fatal error: FatalError{Underlying: exit status 1}
And it seems to be happening on the exact output you're modifying in this PR.
@raffienficiaud Could you try to deploy one of the examples and then run terraform destroy
to see if you can repro this manually? And if so, we'll need to think about how to work around this.
Closing this PR as there has been no activity in a little over 3 years.