fix: update S3 backend config for Terraform init
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 17s

Use non-deprecated s3 endpoint settings, switch to use_path_style, and trim newline characters from B2 credentials when generating backend.hcl in CI.
This commit is contained in:
2026-02-28 00:56:12 +00:00
parent b0768db7a7
commit 47f950d667
2 changed files with 12 additions and 8 deletions

View File

@@ -26,14 +26,16 @@ jobs:
bucket = "${{ secrets.B2_TF_BUCKET }}"
key = "terraform.tfstate"
region = "us-east-005"
endpoint = "${{ secrets.B2_TF_ENDPOINT }}"
access_key = "${{ secrets.B2_KEY_ID }}"
secret_key = "${{ secrets.B2_APPLICATION_KEY }}"
endpoints = {
s3 = "${{ secrets.B2_TF_ENDPOINT }}"
}
access_key = "$(printf '%s' "${{ secrets.B2_KEY_ID }}" | tr -d '\r\n')"
secret_key = "$(printf '%s' "${{ secrets.B2_APPLICATION_KEY }}" | tr -d '\r\n')"
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
skip_requesting_account_id = true
force_path_style = true
use_path_style = true
EOF
echo "Created secrets.auto.tfvars:"
cat secrets.auto.tfvars | sed 's/=.*/=***/'