Skip to content

Commit 94e1215

Browse files
committed
CCM-11586: domain name lifecycles
1 parent 20f4ec2 commit 94e1215

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed
Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
resource "aws_api_gateway_domain_name" "main" {
2-
count = var.manually_configure_mtls_truststore ? 1 : 0
32
regional_certificate_arn = aws_acm_certificate_validation.main.certificate_arn
43
domain_name = local.root_domain_name
54
security_policy = "TLS_1_2"
@@ -18,28 +17,26 @@ resource "aws_api_gateway_domain_name" "main" {
1817
}
1918

2019
lifecycle {
21-
ignore_changes = [
22-
mutual_tls_authentication
23-
]
20+
ignore_changes = var.manually_configure_mtls_truststore ? [mutual_tls_authentication] : []
2421
}
2522
}
2623

27-
resource "aws_api_gateway_domain_name" "main_nonprod" {
28-
count = var.manually_configure_mtls_truststore ? 1 : 0
29-
regional_certificate_arn = aws_acm_certificate_validation.main.certificate_arn
30-
domain_name = local.root_domain_name
31-
security_policy = "TLS_1_2"
32-
33-
endpoint_configuration {
34-
types = ["REGIONAL"]
35-
}
36-
37-
depends_on = [
38-
aws_s3_bucket.truststore
39-
]
40-
41-
mutual_tls_authentication {
42-
truststore_uri = "s3://${aws_s3_bucket.truststore.id}/${aws_s3_object.placeholder_truststore_nonprod[0].id}"
43-
truststore_version = aws_s3_object.placeholder_truststore_nonprod[0].version_id
44-
}
45-
}
24+
# resource "aws_api_gateway_domain_name" "main_nonprod" {
25+
# count = var.manually_configure_mtls_truststore ? 1 : 0
26+
# regional_certificate_arn = aws_acm_certificate_validation.main.certificate_arn
27+
# domain_name = local.root_domain_name
28+
# security_policy = "TLS_1_2"
29+
30+
# endpoint_configuration {
31+
# types = ["REGIONAL"]
32+
# }
33+
34+
# depends_on = [
35+
# aws_s3_bucket.truststore
36+
# ]
37+
38+
# mutual_tls_authentication {
39+
# truststore_uri = "s3://${aws_s3_bucket.truststore.id}/${aws_s3_object.placeholder_truststore_nonprod[0].id}"
40+
# truststore_version = aws_s3_object.placeholder_truststore_nonprod[0].version_id
41+
# }
42+
# }

0 commit comments

Comments
 (0)