When I am running terraform plan
to manage terraform cloud, its fails with
Error: Error reading configuration of membership ou-xxxxxxxxxxxx: unauthorized
This is my provider config:
terraform {
cloud {
organization = "wyssmann-com"
workspaces {
name = "tfcloud-workspace"
}
}
required_providers {
tfe = {
source = "hashicorp/tfe"
}
}
}
provider "tfe" {
hostname = "app.terraform.io" # Terraform Cloud
# token = var.token
}
Following Authentication I tried the following
-
having a variable
TFE_TOKEN
-
having a variable
TF_VAR_TFE_TOKEN
-
using a
variable.tfvars
filetoken = "xxxxx"
I re-created the token several times, but I never get it running
Initializing plugins and modules...
tfe_organization_membership.demo_papanito: Refreshing state... [id=ou-xxxxxxxxxxxxxxxxxxx]
tfe_organization_membership.papanito_papanito: Refreshing state... [id=ou-yyyyyyyyyyyyyyyyyyy]
tfe_organization.papanito: Refreshing state... [id=papanito]
tfe_organization.demo: Refreshing state... [id=demo-com]
β·
β Error: unauthorized
β
β with tfe_organization.demo,
β on demo-com.tf line 1, in resource "tfe_organization" "demo":
β 1: resource "tfe_organization" "demo" {
β
β΅
β·
β Error: Error reading configuration of membership ou-xxxxxxxxxxxxxxxxxxx: unauthorized
β
β with tfe_organization_membership.demo_papanito,
β on demo-com.tf line 8, in resource "tfe_organization_membership" "demo_papanito":
β 8: resource "tfe_organization_membership" "demo_papanito" {
β
β΅
β·
β Error: unauthorized
β
β with tfe_organization.papanito,
β on papanito.tf line 1, in resource "tfe_organization" "papanito":
β 1: resource "tfe_organization" "papanito" {
β
β΅
β·
β Error: Error reading configuration of membership ou-yyyyyyyyyyyyyyyyyyy: unauthorized
β
β with tfe_organization_membership.papanito_papanito,
β on papanito.tf line 9, in resource "tfe_organization_membership" "papanito_papanito":
β 9: resource "tfe_organization_membership" "papanito_papanito" {
β
β΅
Operation failed: failed running terraform plan (exit 1)