[英]Assign global permission on VCenter with Terraform vSphere provider
我想弄清楚如何使用 terraform 和 vsphere 提供程序在 vCenter 中分配全局权限。
到目前为止,我有:
//== VSphere ==//
provider "vsphere" {
user = var.vsphere_username
password = var.vsphere_password
vsphere_server = var.vsphere_server
# If you have a self-signed cert
allow_unverified_ssl = true
}
//== Example Role ==//
resource vsphere_role "example" {
name = "Example Read"
role_privileges = [
"Datastore.Browse",
"Global.GlobalTag",
"Performance.ModifyIntervals"
]
}
//Taking syntax from terrafrom docs:
resource "vsphere_entity_permissions" p1 {
# Is there a way to say "root/global" permission here?
entity_id = data.vsphere_virtual_machine.vm1.id
entity_type = "VirtualMachine"
permissions {
user_or_group = "mydomain\\my-group"
propagate = true
is_group = true
role_id = vsphere_role.example.id
}
}
目前有没有办法做到这一点? 谢谢!
不,这在今天不可用。
全局权限通常由独立的基于 SSO 的 API 服务和 SDK 管理,而标准的、单一的 vCenter 权限 API 服务是 vSphere Web Services API 的一部分。 不幸的是,Terraform 和 vSphere 提供商无法在幕后使用单独的 SDK。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.