Skip to content

Commit e68b246

Browse files
fix: Correct loop extraction logic for tls.issuer_cert_authority (#337)
* fix: Remove unnecessary for_each * fix: Add comment on tls in complete example * fix: Correct loop logic --------- Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
1 parent 1553f58 commit e68b246

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

examples/complete/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ module "ecs" {
144144

145145
port_name = local.container_name
146146
discovery_name = local.container_name
147+
# Example TLS configuration
148+
# tls = {
149+
# issuer_cert_authority = {
150+
# aws_pca_authority_arn = aws_acmpca_certificate_authority.this.arn
151+
# }
152+
# role_arn = module.tls_role.iam_role_arn
153+
# kms_key = module.tls_role.kms_key_arn
154+
# }
147155
}
148156
]
149157
}

modules/service/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ resource "aws_ecs_service" "this" {
251251

252252
content {
253253
dynamic "issuer_cert_authority" {
254-
for_each = tls.value.issuer_cert_authority
254+
for_each = [tls.value.issuer_cert_authority]
255255

256256
content {
257257
aws_pca_authority_arn = issuer_cert_authority.value.aws_pca_authority_arn

0 commit comments

Comments
 (0)