feat(aws): add xnoto.dev website publisher - #51
Merged
Conversation
Contributor
OpenTofu TestOpenTofu test passed. View run output |
Contributor
OpenTofu PlanOpenTofu plan passed. View run outputOpenTofu will perform the following actions:
# aws_iam_role.github_actions_xnoto_dev_site_deploy will be created
+ resource "aws_iam_role" "github_actions_xnoto_dev_site_deploy" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = "sts:AssumeRoleWithWebIdentity"
+ Condition = {
+ StringEquals = {
[REDACTED: potentially sensitive plan output]
[REDACTED: potentially sensitive plan output]
}
}
+ Effect = "Allow"
+ Principal = {
[REDACTED: potentially sensitive plan output]
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "github-actions-xnoto-dev-site-deploy"
+ name_prefix = (known after apply)
+ path = "/"
+ tags = {
+ "ManagedBy" = "Terraform"
+ "Purpose" = "xnoto-dev-site-deployment"
}
+ tags_all = {
+ "ManagedBy" = "Terraform"
+ "Purpose" = "xnoto-dev-site-deployment"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# aws_iam_role_policy.github_actions_xnoto_dev_site_deploy will be created
+ resource "aws_iam_role_policy" "github_actions_xnoto_dev_site_deploy" {
+ id = (known after apply)
+ name = "xnoto-dev-site-deployment"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Effect = "Allow"
+ Resource = "arn:aws:s3:::xnoto.dev"
+ Sid = "ListSiteAssetBucket"
},
+ {
+ Action = [
+ "s3:AbortMultipartUpload",
+ "s3:DeleteObject",
+ "s3:GetObject",
+ "s3:ListMultipartUploadParts",
+ "s3:PutObject",
]
+ Effect = "Allow"
+ Resource = "arn:aws:s3:::xnoto.dev/*"
+ Sid = "PublishSiteAssets"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
# aws_s3_bucket.web["xnoto.dev"] will be created
+ resource "aws_s3_bucket" "web" {
+ acceleration_status = (known after apply)
+ acl = (known after apply)
+ arn = (known after apply)
+ bucket = "xnoto.dev"
+ bucket_domain_name = (known after apply)
+ bucket_namespace = (known after apply)
+ bucket_prefix = (known after apply)
+ bucket_region = (known after apply)
+ bucket_regional_domain_name = (known after apply)
+ force_destroy = false
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ object_lock_enabled = (known after apply)
+ policy = (known after apply)
+ region = "us-west-2"
+ request_payer = (known after apply)
+ tags = {
+ "ManagedBy" = "Terraform"
}
+ tags_all = {
+ "ManagedBy" = "Terraform"
}
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ cors_rule (known after apply)
+ grant (known after apply)
+ lifecycle_rule (known after apply)
+ logging (known after apply)
+ object_lock_configuration (known after apply)
+ replication_configuration (known after apply)
+ server_side_encryption_configuration (known after apply)
+ versioning (known after apply)
+ website (known after apply)
}
# aws_s3_bucket_policy.web["xnoto.dev"] will be created
+ resource "aws_s3_bucket_policy" "web" {
+ bucket = "xnoto.dev"
+ id = (known after apply)
+ policy = (known after apply)
+ region = "us-west-2"
}
# aws_s3_bucket_public_access_block.web["xnoto.dev"] will be created
+ resource "aws_s3_bucket_public_access_block" "web" {
+ block_public_acls = false
+ block_public_policy = false
+ bucket = "xnoto.dev"
+ id = (known after apply)
+ ignore_public_acls = false
+ region = "us-west-2"
+ restrict_public_buckets = false
}
# aws_s3_bucket_website_configuration.web["xnoto.dev"] will be created
+ resource "aws_s3_bucket_website_configuration" "web" {
+ bucket = "xnoto.dev"
+ id = (known after apply)
+ region = "us-west-2"
+ routing_rules = (known after apply)
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ index_document {
+ suffix = "index.html"
}
+ routing_rule (known after apply)
}
Plan: 6 to add, 0 to change, 0 to destroy.
OpenTofu will perform the following actions:
# aws_iam_role.github_actions_xnoto_dev_site_deploy will be created
+ resource "aws_iam_role" "github_actions_xnoto_dev_site_deploy" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = "sts:AssumeRoleWithWebIdentity"
+ Condition = {
+ StringEquals = {
[REDACTED: potentially sensitive plan output]
[REDACTED: potentially sensitive plan output]
}
}
+ Effect = "Allow"
+ Principal = {
[REDACTED: potentially sensitive plan output]
}
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "github-actions-xnoto-dev-site-deploy"
+ name_prefix = (known after apply)
+ path = "/"
+ tags = {
+ "ManagedBy" = "Terraform"
+ "Purpose" = "xnoto-dev-site-deployment"
}
+ tags_all = {
+ "ManagedBy" = "Terraform"
+ "Purpose" = "xnoto-dev-site-deployment"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# aws_iam_role_policy.github_actions_xnoto_dev_site_deploy will be created
+ resource "aws_iam_role_policy" "github_actions_xnoto_dev_site_deploy" {
+ id = (known after apply)
+ name = "xnoto-dev-site-deployment"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Effect = "Allow"
+ Resource = "arn:aws:s3:::xnoto.dev"
+ Sid = "ListSiteAssetBucket"
},
+ {
+ Action = [
+ "s3:AbortMultipartUpload",
+ "s3:DeleteObject",
+ "s3:GetObject",
+ "s3:ListMultipartUploadParts",
+ "s3:PutObject",
]
+ Effect = "Allow"
+ Resource = "arn:aws:s3:::xnoto.dev/*"
+ Sid = "PublishSiteAssets"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
# aws_s3_bucket.web["xnoto.dev"] will be created
+ resource "aws_s3_bucket" "web" {
+ acceleration_status = (known after apply)
+ acl = (known after apply)
+ arn = (known after apply)
+ bucket = "xnoto.dev"
+ bucket_domain_name = (known after apply)
+ bucket_namespace = (known after apply)
+ bucket_prefix = (known after apply)
+ bucket_region = (known after apply)
+ bucket_regional_domain_name = (known after apply)
+ force_destroy = false
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ object_lock_enabled = (known after apply)
+ policy = (known after apply)
+ region = "us-west-2"
+ request_payer = (known after apply)
+ tags = {
+ "ManagedBy" = "Terraform"
}
+ tags_all = {
+ "ManagedBy" = "Terraform"
}
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ cors_rule (known after apply)
+ grant (known after apply)
+ lifecycle_rule (known after apply)
+ logging (known after apply)
+ object_lock_configuration (known after apply)
+ replication_configuration (known after apply)
+ server_side_encryption_configuration (known after apply)
+ versioning (known after apply)
+ website (known after apply)
}
# aws_s3_bucket_policy.web["xnoto.dev"] will be created
+ resource "aws_s3_bucket_policy" "web" {
+ bucket = "xnoto.dev"
+ id = (known after apply)
+ policy = (known after apply)
+ region = "us-west-2"
}
# aws_s3_bucket_public_access_block.web["xnoto.dev"] will be created
+ resource "aws_s3_bucket_public_access_block" "web" {
+ block_public_acls = false
+ block_public_policy = false
+ bucket = "xnoto.dev"
+ id = (known after apply)
+ ignore_public_acls = false
+ region = "us-west-2"
+ restrict_public_buckets = false
}
# aws_s3_bucket_website_configuration.web["xnoto.dev"] will be created
+ resource "aws_s3_bucket_website_configuration" "web" {
+ bucket = "xnoto.dev"
+ id = (known after apply)
+ region = "us-west-2"
+ routing_rules = (known after apply)
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ index_document {
+ suffix = "index.html"
}
+ routing_rule (known after apply)
}
Plan: 6 to add, 0 to change, 0 to destroy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xnoto.devto the managed public S3 website-bucket classxnoto/xnoto.devonmain, using its ID-based subject claimxnoto.devNo linked issue.
Type of change
Validation
Impact and rollout
aws_s3_bucket.webpublic-website resource class gainsxnoto.dev; its consumer is the new portfolio site deployment workflow, which remains intentionally absent until this infrastructure is applied and separately approved.xnoto.devwebsite bucket, its public-access configuration, anonymous-read policy, website configuration, the dedicated OIDC role, its narrowly scoped policy, and the non-sensitive role ARN output. It must not change existing buckets, SOPS state, CloudFront, or unrelated IAM roles.repo:xnoto@121333299/xnoto.dev@1358381234:ref:refs/heads/main; it cannot manage infrastructure, state, or CloudFront.prevent_destroy; after apply, removal of the source membership would require a deliberate follow-up plan and would not destroy the bucket automatically.Safety and secrets
AI assistance materially produced this change; reviewers should verify the plan is limited to the listed website resources and that the OIDC subject and S3 policy remain confined to
xnoto.dev.