-
Notifications
You must be signed in to change notification settings - Fork 5
User Permission
chandidas gharami edited this page May 30, 2017
·
1 revision
A configuration block which provides required attributes to configure user permission for a vSphere resource.
permission {
user_name = <"User Name">
role = <"User Role">
}
Currently, this configuration block is used in vsphere_virtual_machine
resource to add/update ownership of a virtual machine.
- user_name - (Mandatory) Name of vSphere user.
- role - (Mandatory) Predefined role.
Add new virtual machine and assign ownership to userA.
resource "vsphere_virtual_machine" "newVm" {
name = "newVm"
...
permission {
user_name = "userA@vsphere.local"
role = "Admin"
}
}
Change ownership to userB by changing user name.
resource "vsphere_virtual_machine" "newVm" {
name = "newVm"
...
permission {
user_name = "userB@vsphere.local"
role = "Admin"
}
}
Delete ownership by deleting permission
configuration block.
resource "vsphere_virtual_machine" "newVm" {
name = "newVm"
...
}