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

v0.49.0 no longers finds local credentials #1086

Open
cloutierMat opened this issue Oct 3, 2023 · 2 comments
Open

v0.49.0 no longers finds local credentials #1086

cloutierMat opened this issue Oct 3, 2023 · 2 comments
Labels

Comments

@cloutierMat
Copy link

Terraform Cloud/Enterprise version

tfe v0.49.0

Terraform version

Terraform v1.3.4

Terraform Configuration Files

terraform {
  required_version = "1.3.4"

  backend "remote" {
    hostname     = "app.terraform.io"
    organization = "XXXX"

    workspaces {
      prefix = "XXXX-"
    }
  }

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "4.38.0"
    }
    tfe = {
      version = "0.49.0"
    }
  }
}

data "tfe_outputs" "XXXX" {
  organization = "XXXX"
  workspace    = "${var.other_workspace}"
}

output "vpc_id" {
  value = concat(data.tfe_outputs.XXXX.values.vpc_id, [""])[0]
}

Debug Output

Initializing the backend...

Initializing provider plugins...
- Finding hashicorp/aws versions matching "~> 4.38.0"...
- Finding hashicorp/tfe versions matching "0.49.0"...
- Using previously-installed hashicorp/aws v4.38.0
- Using previously-installed hashicorp/tfe v0.49.0

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
╷
│ Error: Invalid provider configuration
│ 
│ Provider "registry.terraform.io/hashicorp/tfe" requires explicit
│ configuration. Add a provider block to the root module and configure the
│ provider's required arguments as described in the provider documentation.
│ 
╵
╷
│ Error: Failed to initialize HTTP client
│ 
│   with provider["registry.terraform.io/hashicorp/tfe"],
│   on <empty> line 0:
│   (source code not available)
│ 
│ missing API token
╵

Expected Behavior

I should be seeing the id of the vpc managed by the other terraform workspace.

Actual Behavior

Failure to login results in terraform apply to fail.

Additional Context

As stated in the documentation, I have logged on to terraform using the terraform login command. I am using a remote state backend with local execution. With version 0.48.0. there are no issues and my credentials are succesfully used to gather outputs from my other workspaces. It seems to no longer be working with 0.49.0

@cloutierMat cloutierMat added the bug label Oct 3, 2023
@brandonc
Copy link
Collaborator

brandonc commented Oct 3, 2023

Hi! Thanks for the report. v0.49.0 contained #1034, which did seem to break token configuration. That change was reverted and the provider was re-released as v0.49.1 Sorry for the inconvenience!

I will leave this issue open for a bit so that others may find it easier.

@cloutierMat
Copy link
Author

Awesome and super quick response!
Many thanks! 🙏

@brandonc brandonc pinned this issue Oct 3, 2023
@ctrombley ctrombley unpinned this issue Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants