hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.81k stars 9.16k forks source link

[Bug]: AWS Provider seems to ignore "skip_requesting_account_id" #37062

Open pascalinthecloud opened 6 months ago

pascalinthecloud commented 6 months ago

Terraform Core Version

v1.7.5, v1.8.1

AWS Provider Version

v5.46.0

Affected Resource(s)

provider "aws"

Expected Behavior

When an AWS provider is configured with skip_credentials_validation = true, credential validation is skipped.

Actual Behavior

Terraform still tries to validate credentials.

Relevant Error/Panic Output Snippet

│ Warning: AWS account ID not found for provider
│ 
│   with module.hosting.provider["registry.terraform.io/hashicorp/aws"],
│   on hosting/provider.tf line 1, in provider "aws":
│    1: provider "aws" {
│ 
│ See
│ https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_requesting_account_id
│ for implications.
╵

Terraform Configuration Files

provider "aws" {
  region     = var.region
  access_key = ovh_cloud_project_user_s3_credential.s3_admin_cred.access_key_id
  secret_key = ovh_cloud_project_user_s3_credential.s3_admin_cred.secret_access_key

  #OVH implementation has no STS service
  skip_credentials_validation = true
  skip_requesting_account_id  = true
  skip_metadata_api_check     = true
  skip_region_validation      = true

  endpoints {
    s3 = var.s3_endpoint
  }
}

Steps to Reproduce

Run terraform plan with an AWS provider configured to skip credential validation.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 6 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

caiodelgadonew commented 2 months ago

I would love to see this fixed, I know it needs triage but can anything be done to see this happening? @justinretzolk