【发布时间】:2020-12-13 06:55:11
【问题描述】:
我正在尝试弄清楚如何使用 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
}
}
目前有没有办法做到这一点? 谢谢!
【问题讨论】: