docs: stop skipping the account ID lookup in Terraform provider blocks (#1101)

This commit is contained in:
Julian Sommer
2026-09-23 14:13:04 +10:00
committed by GitHub
parent da2e6c5c7b
commit 85dd1dcd75
14 changed files with 35 additions and 62 deletions
+2 -3
View File
@@ -146,12 +146,11 @@ Repositories can be managed as code with the standard `aws_ecr_repository` resou
```hcl
provider "aws" {
region = "ap-southeast-2"
skip_credentials_validation = true
skip_requesting_account_id = true
region = "ap-southeast-2"
endpoints {
ecr = "https://<your-spinifex-gateway>"
sts = "https://<your-spinifex-gateway>"
}
}
+8 -10
View File
@@ -74,10 +74,8 @@ provider "aws" {
s3 = "https://localhost:8443"
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
```
@@ -91,16 +89,16 @@ aws s3 sync s3://local-bucket/ s3://cloud-bucket/ --source-region spinifex --reg
## Terraform Provider Errors
Ensure all four skip flags are set in your provider configuration:
Ensure these two skip flags are set in your provider configuration:
```hcl
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
```
Without these, Terraform will try to validate credentials and metadata against real AWS endpoints.
Without them, Terraform queries the EC2 instance metadata service for credentials and rejects a region name AWS does not know.
Leave `skip_credentials_validation` and `skip_requesting_account_id` unset, and point the `sts` endpoint at Spinifex. The provider then learns the account ID from `GetCallerIdentity` as it does on AWS. With the account ID blank, a security group rule that references a group in the same account reads back as `<account>/sg-...` and never reaches a clean plan.
## S3 Signature Errors
@@ -76,10 +76,8 @@ provider "aws" {
sts = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
# ---------------------------------------------------------------------------
@@ -114,10 +114,8 @@ provider "aws" {
elasticloadbalancingv2 = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
# ---------------------------------------------------------------------------
@@ -118,10 +118,8 @@ provider "aws" {
acm = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
data "aws_availability_zones" "available" {
@@ -80,10 +80,8 @@ provider "aws" {
eks = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
data "terraform_remote_state" "infra" {
@@ -115,10 +115,8 @@ provider "aws" {
acm = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
data "aws_availability_zones" "available" {
@@ -63,10 +63,8 @@ provider "aws" {
eks = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
# Cluster identity comes from the parent module's state; the live endpoint/CA
@@ -103,10 +103,8 @@ provider "aws" {
ecr = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
# ---------------------------------------------------------------------------
@@ -54,10 +54,8 @@ provider "aws" {
eks = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
# Cluster identity comes from the parent module's state; the live endpoint/CA
+3 -5
View File
@@ -58,7 +58,7 @@ variable "region" {
}
variable "instance_type" {
type = string
type = string
default = "t3.small"
}
@@ -82,10 +82,8 @@ provider "aws" {
elasticloadbalancingv2 = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
# ---------------------------------------------------------------------------
@@ -65,10 +65,8 @@ provider "aws" {
sts = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
# ---------------------------------------------------------------------------
@@ -135,10 +135,8 @@ provider "aws" {
rds = var.spinifex_endpoint
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
# ---------------------------------------------------------------------------
+2 -4
View File
@@ -124,10 +124,8 @@ provider "aws" {
s3_use_path_style = true
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_region_validation = true
skip_metadata_api_check = true
skip_region_validation = true
}
# ---------------------------------------------------------------------------