Skip to content

Commit 4e44aeb

Browse files
Generate random password for header auth
1 parent 55a09e6 commit 4e44aeb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

terraform/docs-rs/cloudfront.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ resource "aws_cloudfront_origin_request_policy" "docs_rs" {
6767
}
6868
}
6969

70+
resource "random_password" "origin_auth" {
71+
length = 32
72+
special = false
73+
}
74+
7075
resource "aws_cloudfront_distribution" "webapp" {
7176
comment = local.domain_name
7277

@@ -107,7 +112,7 @@ resource "aws_cloudfront_distribution" "webapp" {
107112

108113
custom_header {
109114
name = "X-Origin-Auth"
110-
value = "some_secret_value"
115+
value = random_password.origin_auth.result
111116
}
112117
}
113118

0 commit comments

Comments
 (0)