Skip to content

Commit 090d4f7

Browse files
Configure static cloudfront ID into an env variable for docs.rs web server
Also grants get object tagging permissions to the web server.
1 parent b180e73 commit 090d4f7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

terraform/docs-rs/web-server.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ module "web" {
1818
ephemeral_storage_gb = 40
1919

2020
environment = {
21-
DOCSRS_PREFIX = "/tmp"
22-
DOCSRS_STORAGE_BACKEND = "s3"
23-
DOCSRS_LOG = "docs_rs=debug,rustwide=info"
24-
RUST_BACKTRACE = "1"
21+
DOCSRS_PREFIX = "/tmp"
22+
DOCSRS_STORAGE_BACKEND = "s3"
23+
DOCSRS_LOG = "docs_rs=debug,rustwide=info"
24+
RUST_BACKTRACE = "1"
25+
DOCSRS_STATIC_CLOUDFRONT_ID = "${aws_cloudfront_distribution.static.id}"
2526
}
2627

2728
secrets = {
@@ -57,6 +58,7 @@ resource "aws_iam_role_policy" "web" {
5758
Effect = "Allow"
5859
Action = [
5960
"s3:PutObject",
61+
"s3:GetObjectTagging",
6062
"s3:PutObjectTagging",
6163
"s3:GetObject",
6264
"s3:PutObjectAcl",

0 commit comments

Comments
 (0)