【Terraform】处理Terraform AWS Provider配置错误:无法获取共享配置文件的解决方法
在TerraformCloud中,当进行terraform plan时,只需要将provider.aws中指定的profile注释掉,就可以正常工作了。仅此而已。
provider "aws" {
#profile = "my-profile" # terraform cloudではprofileを指定するとエラー
region = "ap-northeast-1"
}
terraform {
cloud {
organization = "MyOrganization"
workspaces {
name = "MyWorkspace"
}
}
}
请参考
- https://discuss.hashicorp.com/t/error-configuring-terraform-aws-provider-failed-to-get-shared-config-profile/45500/1