fix(ci): fix terraform s3 backend SignatureDoesNotMatch error in dynamically generated backend config
- Add skip_s3_checksum = true and skip_metadata_api_check = true to s3 backend config
- Use endpoints = { s3 = ... } instead of deprecated endpoint parameter in terraform init
This commit is contained in:
parent
4b1f809937
commit
d225ff74e2
@ -154,6 +154,7 @@ jobs:
|
||||
skip_region_validation = true
|
||||
skip_requesting_account_id = true
|
||||
skip_metadata_api_check = true
|
||||
skip_s3_checksum = true
|
||||
force_path_style = true
|
||||
}
|
||||
}
|
||||
@ -175,7 +176,7 @@ jobs:
|
||||
set -euo pipefail
|
||||
if [ -n "${TF_STATE_BUCKET}" ]; then
|
||||
terraform init -input=false \
|
||||
-backend-config="endpoint=${TF_STATE_ENDPOINT}" \
|
||||
-backend-config="endpoints={s3=\"${TF_STATE_ENDPOINT}\"}" \
|
||||
-backend-config="bucket=${TF_STATE_BUCKET}" \
|
||||
-backend-config="key=ai-workspace/terraform.tfstate" \
|
||||
-backend-config="region=${TF_STATE_REGION:-us-east-1}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user