Reputation: 299
I'm following this documentation in migrating the local state to be integrated with Terraform Cloud.
https://learn.hashicorp.com/tutorials/terraform/cloud-migrate
It is fairly straightforward, I just need to copy this code:
terraform {
required_version = ">= 1.1.0"
required_providers {
random = {
source = "hashicorp/random"
version = "3.0.1"
}
}
cloud {
organization = "<ORG_NAME>"
workspaces {
name = "Example-Workspace"
}
}
}
The problem is that my code below has the same code with above
terraform {
required_version = ">= 0.14.9"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.27"
}
}
cloud {
organization = "ORG"
workspaces {
name = "ORG_WORKSPACE"
}
}
}
But it is returning an error:
Blocks of type "cloud" are not expected here.
Some notes:
providers.tf
.terraform apply
, thus returning tfstate.terraform login
with my credentials.Any help would be much appreciated. Thank you!
Upvotes: 3
Views: 3235