File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
infrastructure/instance/modules/api_gateway Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ resource "aws_apigatewayv2_domain_name" "service_api_domain_name" {
3838 security_policy = " TLS_1_2"
3939 }
4040 mutual_tls_authentication {
41- truststore_uri = " s3://${ aws_s3_bucket . truststore_bucket . bucket } /${ local . truststore_file_name } "
41+ truststore_uri = " s3://${ aws_s3_bucket . truststore_bucket . bucket } /${ local . truststore_file_name } "
42+ truststore_version = aws_s3_object_copy. copy_cert_from_storage . version_id
4243 }
4344 tags = {
4445 Name = " ${ var . prefix } -api-domain-name"
Original file line number Diff line number Diff line change @@ -17,8 +17,18 @@ resource "aws_s3_bucket" "truststore_bucket" {
1717 force_destroy = true
1818}
1919
20+ resource "aws_s3_bucket_versioning" "truststore_bucket" {
21+ bucket = aws_s3_bucket. truststore_bucket . bucket
22+ versioning_configuration {
23+ status = " Enabled"
24+ }
25+ }
26+
2027resource "aws_s3_object_copy" "copy_cert_from_storage" {
2128 bucket = aws_s3_bucket. truststore_bucket . bucket
2229 key = local. truststore_file_name
2330 source = " ${ data . aws_s3_object . cert . bucket } /${ local . truststore_file_name } "
31+ lifecycle {
32+ replace_triggered_by = [data . aws_s3_object . cert . etag ]
33+ }
2434}
You can’t perform that action at this time.
0 commit comments