Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ No modules.
| [aws_iam_role_policy.github_actions_channel_project_site_deploy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_iam_role_policy.github_actions_channel_project_site_infrastructure](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_iam_role_policy.github_actions_channel_project_site_log_delivery](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_iam_role_policy.github_actions_channel_project_site_public_origin](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_iam_role_policy.github_actions_channel_project_state](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_iam_role_policy.github_actions_sops_kms](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_iam_role_policy.github_actions_twilio_state](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
Expand Down
32 changes: 32 additions & 0 deletions aws-channel-project-site-public-origin.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# The public Orthodox Channel website origin follows the existing
# makeitwork.cloud S3 website class. It is intentionally separate from the
# private OAC-protected artifact bucket, which remains the rollback origin.
# Publication remains limited to channel-project's main-only deployment role.
resource "aws_iam_role_policy" "github_actions_channel_project_site_public_origin" {
name = "channel-project-site-public-origin"
role = aws_iam_role.github_actions_channel_project_site_deploy.id

policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Sid = "ListPublicSiteOrigin"
Effect = "Allow"
Action = ["s3:ListBucket"]
Resource = aws_s3_bucket.web["orthodox.channel"].arn
},
{
Sid = "PublishPublicSiteAssets"
Effect = "Allow"
Action = [
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:GetObject",
"s3:ListMultipartUploadParts",
"s3:PutObject",
]
Resource = "${aws_s3_bucket.web["orthodox.channel"].arn}/*"
},
]
})
}
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ locals {
s3_public_buckets = toset([])
s3_web_buckets = toset([
"makeitwork.cloud",
"onion.makeitwork.cloud"
"onion.makeitwork.cloud",
"orthodox.channel",
])
}
Loading