Skip to content

Commit

Permalink
fixing certification issue
Browse files Browse the repository at this point in the history
  • Loading branch information
adekunle ibitayo committed Nov 1, 2019
1 parent 305820d commit 8ad984f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
*/

locals {
aws_acmpca_certificate_authority_arn = "${coalesce(element(concat(aws_acmpca_certificate_authority.msk_kafka_with_ca.*.arn, list("")), 0), element(concat(aws_acmpca_certificate_authority.msk_kafka_ca_with_config.*.arn, list("")), 0))}"
msk_cluster_arn = "${coalesce(element(concat(aws_msk_cluster.msk_kafka.*.arn, list("")), 0), element(concat(aws_msk_cluster.msk_kafka_with_config.*.arn, list("")), 0))}"
aws_acmpca_certificate_authority_arn = var.certificateauthority == "true" ? coalesce(element(concat(aws_acmpca_certificate_authority.msk_kafka_with_ca.*.arn, list("")), 0), element(concat(aws_acmpca_certificate_authority.msk_kafka_ca_with_config.*.arn, list("")), 0)) : ""
msk_cluster_arn = coalesce(element(concat(aws_msk_cluster.msk_kafka.*.arn, list("")), 0), element(concat(aws_msk_cluster.msk_kafka_with_config.*.arn, list("")), 0))
}

data "aws_caller_identity" "current" {}
Expand Down Expand Up @@ -173,8 +173,7 @@ resource "aws_msk_cluster" "msk_kafka_with_config" {

client_authentication {
tls {
certificate_authority_arns = [aws_acmpca_certificate_authority.msk_kafka_ca_with_config[count.index].arn]
}
certificate_authority_arns = aws_acmpca_certificate_authority_arn
}

encryption_info {
Expand Down

0 comments on commit 8ad984f

Please sign in to comment.