File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ name: Terraform GitHub
1414 workflow_dispatch :
1515env :
1616 TF_VAR_GITHUB_APP_PEM_FILE : ${{ secrets.TF_VAR_GITHUB_APP_PEM_FILE }}
17+ AWS_ACCESS_KEY_ID : ${{ secrets.TF_S3_ACCESS_KEY_ID }}
18+ AWS_SECRET_ACCESS_KEY : ${{ secrets.TF_S3_SECRET_ACCESS_KEY }}
1719jobs :
1820 terraform :
1921 name : Terraform
2527 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2628
2729 - uses : hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
28- with :
29- cli_config_credentials_token : ${{ secrets.TF_API_TOKEN }}
3030
3131 - name : Terraform fmt
3232 id : fmt
Original file line number Diff line number Diff line change @@ -5,12 +5,23 @@ terraform {
55 version = " 6.11.1"
66 }
77 }
8- cloud {
9- organization = " stackhpc"
108
11- workspaces {
12- name = " github"
9+ backend "s3" {
10+ bucket = " github-terraform-backend"
11+ key = " github/terraform.tfstate"
12+ region = " auto" # Cloudflare R2 uses "auto" for the region
13+ use_lockfile = true
14+
15+ endpoints = {
16+ s3 = " https://99e8d2e95b14ef888ce364a5ab310629.r2.cloudflarestorage.com"
1317 }
18+
19+ # Bypasses strict AWS checks so the S3-compatible API works
20+ skip_credentials_validation = true
21+ skip_region_validation = true
22+ skip_requesting_account_id = true
23+ skip_metadata_api_check = true
24+ skip_s3_checksum = true
1425 }
1526}
1627
You can’t perform that action at this time.
0 commit comments