File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ resource "aws_api_gateway_base_path_mapping" "api_mapping" {
2323 stage_name = var. environment
2424 domain_name = local. api_gateway_full_domain_name
2525
26- depends_on = [aws_api_gateway_deployment . ndr_api_deploy , aws_api_gateway_rest_api . ndr_doc_store_api ]
26+ depends_on = [aws_api_gateway_deployment . ndr_api_deploy , aws_api_gateway_rest_api . ndr_doc_store_api , aws_api_gateway_stage . ndr_api ]
2727}
2828
2929resource "aws_api_gateway_resource" "auth_resource" {
@@ -95,6 +95,10 @@ resource "aws_api_gateway_stage" "ndr_api" {
9595 depends_on = [
9696 aws_cloudwatch_log_group . api_gateway_stage
9797 ]
98+
99+ lifecycle {
100+ create_before_destroy = true
101+ }
98102}
99103
100104resource "aws_cloudwatch_log_group" "api_gateway_stage" {
Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ resource "aws_api_gateway_base_path_mapping" "api_mapping_mtls" {
3333 stage_name = var. environment
3434 domain_name = aws_api_gateway_domain_name. custom_api_domain_mtls . domain_name
3535
36- depends_on = [aws_api_gateway_deployment . ndr_api_deploy_mtls ]
36+ depends_on = [
37+ aws_api_gateway_deployment . ndr_api_deploy_mtls ,
38+ aws_api_gateway_stage . ndr_api_mtls ,
39+ aws_api_gateway_rest_api . ndr_doc_store_api_mtls
40+ ]
3741}
3842
3943resource "aws_api_gateway_deployment" "ndr_api_deploy_mtls" {
@@ -67,6 +71,10 @@ resource "aws_api_gateway_stage" "ndr_api_mtls" {
6771 rest_api_id = aws_api_gateway_rest_api. ndr_doc_store_api_mtls . id
6872 stage_name = var. environment
6973 xray_tracing_enabled = var. enable_xray_tracing
74+
75+ lifecycle {
76+ create_before_destroy = true
77+ }
7078}
7179
7280resource "aws_cloudwatch_log_group" "mtls_api_gateway_stage" {
You can’t perform that action at this time.
0 commit comments