Skip to content

Commit d5a6d6d

Browse files
committed
fix(cloudfront): cache policy and origin request policy names
1 parent 453b063 commit d5a6d6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ data "aws_cloudfront_cache_policy" "managed_caching_disabled" {
235235
resource "aws_cloudfront_cache_policy" "oidc" {
236236
count = length(var.oidc) == 0 ? 0 : 1
237237

238-
name = "no-cache-oidc-policy"
238+
name = "no-cache-oidc-policy_${replace(local.main_domain_sanitized, ".", "-")}"
239239
comment = "Disable caching for OIDC"
240240
default_ttl = 0
241241
min_ttl = 0
@@ -261,7 +261,7 @@ resource "aws_cloudfront_cache_policy" "oidc" {
261261
resource "aws_cloudfront_origin_request_policy" "oidc" {
262262
count = length(var.oidc) == 0 ? 0 : 1
263263

264-
name = "oidc-origin-policy"
264+
name = "oidc-origin-policy_${replace(local.main_domain_sanitized, ".", "-")}"
265265
comment = "Forward all cookies and query strings for OIDC"
266266

267267
cookies_config {

0 commit comments

Comments
 (0)