Skip to content

Commit 9af8273

Browse files
committed
csi scope cf policies
1 parent 04e81ed commit 9af8273

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

infrastructure/terraform/components/app/amplify_domain_association.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ resource "null_resource" "amplify_domain_association" {
2929
command = "aws amplify create-domain-association --app-id ${self.triggers.amplify_app_id} --domain-name ${self.triggers.amplify_domain_name} --sub-domain-settings prefix=\"\",branchName=\"${self.triggers.amplify_branch_name}\" prefix=\"${self.triggers.amplify_url_prefix}\",branchName=\"${self.triggers.amplify_branch_name}\" --enable-auto-sub-domain --auto-sub-domain-creation-patterns \"*,*/*,pr*\""
3030
}
3131

32-
# provisioner "local-exec" {
33-
# when = destroy
34-
# command = "aws amplify delete-domain-association --app-id ${self.triggers.amplify_app_id} --domain-name ${self.triggers.amplify_domain_name}"
35-
# }
32+
provisioner "local-exec" {
33+
when = destroy
34+
command = "aws amplify delete-domain-association --app-id ${self.triggers.amplify_app_id} --domain-name ${self.triggers.amplify_domain_name}"
35+
}
3636
}

infrastructure/terraform/components/app/cloudfront_distribution_main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ resource "aws_cloudfront_distribution" "main" {
6868
}
6969

7070
resource "aws_cloudfront_cache_policy" "no_cache" {
71-
name = "no-cache-policy"
71+
name = "${local.csi}-no-cache-policy"
7272

7373
default_ttl = 0
7474
max_ttl = 0
@@ -82,7 +82,7 @@ resource "aws_cloudfront_cache_policy" "no_cache" {
8282
}
8383

8484
resource "aws_cloudfront_origin_request_policy" "forward_cookies" {
85-
name = "forward-cookies"
85+
name = "${local.csi}-forward-cookies"
8686
cookies_config { cookie_behavior = "all" }
8787
headers_config { header_behavior = "none" }
8888
query_strings_config { query_string_behavior = "none" }

0 commit comments

Comments
 (0)