我正在尝试使用Terraform创建文件夹,但是当我运行terraform apply
时,出现以下错误:
Error: Error applying plan: 1 error(s) occurred: * module.create_infra_setup.google_folder.new_folder: 1 error(s) occurred: * google_folder.new_folder: Error creating folder 'tf-folder-test-1' in 'xxxxx.com': googleapi: Error 400: Request contains an invalid argument., badRequest
其中xxxx.com是组织名称
这是main.tf调用的模块:
module "create_infra_setup" {
source = "../modules/global/"
folder_name = "${var.var_folder_name}"
}
以下是模块中资源的摘要:
resource "google_folder" "new_folder" {
display_name = "${var.folder_name}"
parent = "${var.organization}"
}
这是terraform.tfvars参数定义:
var_folder_name = "tf-folder-test-1"
我正在使用的svc帐户是否存在此权限问题?该帐户在组织级别具有Folder admin
特权。