I tried to migrate my terraform state and code from my local machine to Terraform cloud , I have been able to migrate the state successfully but I’m unable to run Terraform plan or apply from the Terraform cloud and getting the below error , The same runs fine if I try to run locally and having the state file in the terraform cloud backend , below are the code snippets
terraform {
backend "remote" {
hostname = "app.terraform.io"
organization = "$$$$$$$$$"
workspaces {
name = "*******"
}
}
required_providers {
aws = {
source = "hashicorp/aws"
version = "4.5.0"
}
}
}
provider "aws" {
profile = "default"
region = "us-east-1"
}
provider "aws" {
profile = "default"
region = "eu-west-1"
alias = "eu"
}
Error: error configuring Terraform AWS Provider: failed to get shared config profile, default
│
│ with provider["registry.terraform.io/hashicorp/aws"],
│ on providers.tf line 1, in provider "aws":
│ 1: provider "aws"
Below Environment variables have been set in Terraform cloud