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

Does not work with Terraform 0.13 on TFC #209

Closed
ktham opened this issue Aug 24, 2020 · 10 comments
Closed

Does not work with Terraform 0.13 on TFC #209

ktham opened this issue Aug 24, 2020 · 10 comments
Assignees

Comments

@ktham
Copy link

ktham commented Aug 24, 2020

Error msg

Screen Shot 2020-08-24 at 9 46 56 AM

Provider version

terraform {
  required_version = "0.13.0"

  required_providers {
    tfe = {
      source  = "hashicorp/tfe"
      version = "0.21.0"
    }
  }
}

provider "tfe" {
  token = var.tfe_token
}
@koikonom
Copy link
Contributor

Hi @ktham!

I tried reproducing the issue you reported but I was not able to. I created a new workspace and linked it to a test github repo that contained just the following code:

terraform {
  required_version = "0.13.0"

  required_providers {
    tfe = {
      source  = "hashicorp/tfe"
      version = "0.21.0"
    }
  }
}

provider "tfe" {}

resource "tfe_organization" "test" {
  name  = "a-random-org-name"
  email = "admin@company.com"
}

Are you still experiencing the same issue?

@koikonom koikonom self-assigned this Aug 26, 2020
@ktham
Copy link
Author

ktham commented Aug 26, 2020

Hi @koikonom ! Thanks for follow up. I experience this when trying to upgrade from 0.12.29 to 0.13.0. So first try doing the former, create a few resources, then do the upgrade and you'll run into this issue

@ghost ghost removed the needs-more-info label Aug 26, 2020
@koikonom
Copy link
Contributor

Hi @ktham, I tried that as well (set version to 0.12.29, plan, apply, set version to 0.13, plan, apply) and I'm still not able to hit the same error.

Can you please set an environment variable TF_LOG with the value of 1, reproduce the issue and send us the log in a gist? (Be careful not to include any tokens or other sensitive information)

@sethbacon
Copy link

I'm also having same issue. I will also try to get a log.

@sethbacon
Copy link

Plan
https://gist.github.com/sethbacon/e80ff3430a03d321ae689c66fc3e04c2

Truncated large sections of this due to sheer size...Tried to leave the interesting bits...

Apply
https://gist.github.com/sethbacon/f0f0322c78d5b03d97f66696f265de12

@ghost ghost removed the needs-more-info label Sep 3, 2020
@koikonom
Copy link
Contributor

koikonom commented Sep 3, 2020

Excellent, thank you very much for the logs. I will look into it and get back to you!

@sethbacon
Copy link

BTW, I can confirm a new workspace using the TFE provider with no existing state works fine within my TF Cloud organization.

@koikonom
Copy link
Contributor

koikonom commented Sep 3, 2020

This is also reported in hashicorp/terraform#26075 .

As a (one-off) workaround please use the terraform state replace-provider command, look at hashicorp/terraform#26075 (comment) for an example.

In this case the command should be:
terraform state replace-provider 'registry.terraform.io/-/tfe' 'registry.terraform.io/hashicorp/tfe'

@sethbacon
Copy link

That worked to clear the issue for me.

@ktham
Copy link
Author

ktham commented Sep 8, 2020

That worked for me also. Thanks guys! I'll close this issue

@ktham ktham closed this as completed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants