Reputation: 2325
I am trying to migrate my local state file to TF Cloud by following this link :
https://learn.hashicorp.com/tutorials/terraform/cloud-migrate?in=terraform/cloud
I already have my workspace and i have logged in to TF Cloud from the CMD Line using the API token that i got. My code is shown below
terraform {
required_version = ">= 1.1.0"
required_providers {
random = {
source = "hashicorp/random"
version = "3.0.1"
}
}
cloud {
organization = "Pallab-Training"
workspaces {
name = "terraform-azurerm-networking"
}
}
}
/* terraform {
required_providers {
random = {
source = "hashicorp/random"
version = "3.0.1"
}
}
required_version = "~> 1.0"
} */
variable "name_length" {
description = "The number of words in the pet name"
default = "3"
}
resource "random_pet" "pet_name" {
length = var.name_length
separator = "-"
}
output "pet_name" {
value = random_pet.pet_name.id
}
But i get the error constantly as attached. I am trying to use Terraform 1.1 Any idea why this error is coming even though i am following the tutorial as it is
Upvotes: 1
Views: 171