Skip to content

Terraform apply fails to configure AWS provider with shared credential file #15361

@DylanSp

Description

@DylanSp

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

terraform apply is failing to discover AWS credentials in ~/.aws/credentials.

Terraform CLI and Terraform AWS Provider Version

$ terraform -v
Terraform v0.13.3

  • provider registry.terraform.io/hashicorp/aws v3.8.0

Affected Resource(s)

  • aws_s3

Terraform Configuration Files

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 3.8"
    }
  }
}

provider "aws" {
  profile = "idxdev"
  region  = "us-east-1"
}

resource "aws_s3_bucket" "example_bucket" {
  bucket = "example-tf-bucket"
}

Debug Output

TF_LOG=trace terraform apply output.

Expected Behavior

Terraform creates and shows an execution plan.

Actual Behavior

terraform apply fails with "error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found".

Steps to Reproduce

  1. Create a new directory.
  2. Put the configuration file above into example.tf.
  3. terraform init
  4. terraform apply

References

Possible related issue: #12815

Metadata

Metadata

Assignees

Labels

providerPertains to the provider itself, rather than any interaction with AWS.windowsIssues and PRs that relate to using the provider on the Windows operating system.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions