Skip to content

Commit

Permalink
Add create_before_destroy lifecycle (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
santhoshratala authored Jun 26, 2024
1 parent 8484bf8 commit 26424c5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/cache/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ resource "aws_cloudfront_cache_policy" "this" {
}
}
}

lifecycle {
create_before_destroy = true
}
}
4 changes: 4 additions & 0 deletions modules/origin-request/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ resource "aws_cloudfront_origin_request_policy" "this" {
}
}
}

lifecycle {
create_before_destroy = true
}
}
4 changes: 4 additions & 0 deletions modules/response-headers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,8 @@ resource "aws_cloudfront_response_headers_policy" "this" {
enabled = var.server_timing_header.enabled
sampling_rate = var.server_timing_header.sampling_rate
}

lifecycle {
create_before_destroy = true
}
}

0 comments on commit 26424c5

Please sign in to comment.