Skip to content

Commit 413043c

Browse files
committed
fix: Add IAM policy for access to the exports bucket.
1 parent 97d7c93 commit 413043c

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.github/actions/setup-opentofu/action.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ runs:
2424
run: tofu version
2525
- name: Set optional variables
2626
shell: bash
27+
env:
28+
TF_VAR_REGION: ${{ env.AWS_REGION }}
2729
# For any of the defined variables that have a value set into TF_VAR_*
2830
# (all uppercase), we set the corresponding TF_VAR_* (lowercase) variable
2931
# that OpenTofu expects.
@@ -34,7 +36,7 @@ runs:
3436
"database_skip_final_snapshot" "deletion_protection"
3537
"deployment_environments" "environment" "export_expiration"
3638
"image_tags_mutable" "key_recovery_period" "log_level" "program"
37-
"project" "repository"
39+
"project" "region" "repository"
3840
)
3941
for var in ${variables[@]}; do
4042
name="TF_VAR_$(echo $var | tr '[:lower:]' '[:upper:]')"

.github/workflows/deploy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
needs: plan
6767
environment: ${{ inputs.environment || 'development' }}
6868
env:
69+
AWS_REGION: ${{ secrets.AWS_REGION }}
6970
TF_VAR_image_tag: ${{ inputs.image_tag || github.sha }}
7071
# Set required variables.
7172
TF_VAR_repo_oidc_arn: ${{ secrets.TF_VAR_REPO_OIDC_ARN }}

.github/workflows/launch-tools.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
environment: ${{ inputs.environment }}
2828
env:
29+
AWS_REGION: ${{ secrets.AWS_REGION }}
2930
# Set required variables.
3031
TF_VAR_repo_oidc_arn: ${{ secrets.TF_VAR_REPO_OIDC_ARN }}
3132
TF_VAR_vpc_cidr: ${{ secrets.TF_VAR_VPC_CIDR }}

tofu/modules/system/templates/exports-access-policy.yaml.tftpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Statement:
1212
Action:
1313
- s3:PutObject
1414
Resource:
15-
- "${bucket_arn}:*"
15+
- "${bucket_arn}/*"

0 commit comments

Comments
 (0)