Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement]: Improve error message: configuring Terraform AWS Provider: failed to get shared config profile, private-cloud-seeknow #34444

Open
EugenKon opened this issue Nov 16, 2023 · 3 comments
Labels
authentication Pertains to authentication; to the provider itself of otherwise. enhancement Requests to existing resources that expand the functionality or scope.

Comments

@EugenKon
Copy link

EugenKon commented Nov 16, 2023

Terraform Version

Terraform v1.6.4
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.67.0
+ provider registry.terraform.io/hashicorp/external v2.3.1
+ provider registry.terraform.io/hashicorp/local v2.3.0
+ provider registry.terraform.io/hashicorp/null v3.2.1

Terraform Configuration Files

$ cat provider.tf
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.0"
    }

    local = {
      source = "hashicorp/local"
      version = "2.3.0"
    }

    # Needed to upgrade old Portal projects
    null = {
      source = "hashicorp/null"
      version = "~> 3.2"
    }
  }
}

provider "aws" {
  region = var.aws_region
  default_tags {
    tags = {
      Project = var.project_name
    }
  }
}

Debug Output

data.external.get_audit_output: Reading...
data.external.get_audit_output: Read complete after 1s [id=-]

Changes to Outputs:
  + iguides_bucket_name = "-portal-iguides"
  + project_name        = ""
  + user_bucket_name    = "-portal-users"

You can apply this plan to save these new output values to the Terraform state, without
changing any real infrastructure.
╷
│ Error: configuring Terraform AWS Provider: failed to get shared config profile, private-cloud-seeknow
│
│   with provider["registry.terraform.io/hashicorp/aws"],
│   on provider.tf line 21, in provider "aws":
│   21: provider "aws" {
│

Expected Behavior

More clear error message. I do not understand which shared config is requested.

Actual Behavior

Not clear error message

Steps to Reproduce

  1. terraform init
  2. terraform plan

Additional Context

hashicorp/terraform#34256

References

No response

@EugenKon EugenKon added the bug Addresses a defect in current functionality. label Nov 16, 2023
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 16, 2023
@EugenKon EugenKon changed the title [Bug]: sdfdf [Improvement]: Improve error message: configuring Terraform AWS Provider: failed to get shared config profile, private-cloud-seeknow Nov 16, 2023
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. authentication Pertains to authentication; to the provider itself of otherwise. and removed bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Nov 16, 2023
@socketbox
Copy link

Not sure how @EugenKon got a stack reference. Even with TF_LOG=trace, I get only this (within a GitHub Actions step):

2024-01-26T15:51:32.335Z [DEBUG] Module installer: s3.s3_policy installed at .terraform/modules/s3.s3_policy
2024-01-26T15:51:32.336Z [TRACE] modsdir: writing modules manifest to .terraform/modules/modules.json
╷
│ Error: failed to get shared config profile, test-profile
│ 
│ 
╵

Error: Process completed with exit code 1.
##[debug]Finishing: Copy files to S3

Terraform version 1.7.0
AWS Provider version 5.33.0

@mykolaov
Copy link

Have the same problem.
I have tried version greater than 1.3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication Pertains to authentication; to the provider itself of otherwise. enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
Development

No branches or pull requests

4 participants