back
terraform {
required_providers {
vsphere = ">= 1.25.0"
}
}
top
module "vsphere_role" {
source = "./modules/vsphere/r/vsphere_role"
# name - (required) is a type of string
name = null
# role_privileges - (optional) is a type of list of string
role_privileges = []
}
top
variable "name" {
description = "(required) - Name of the storage policy."
type = string
}
variable "role_privileges" {
description = "(optional) - The privileges to be associated with the role."
type = list(string)
default = null
}
top
resource "vsphere_role" "this" {
# name - (required) is a type of string
name = var.name
# role_privileges - (optional) is a type of list of string
role_privileges = var.role_privileges
}
top
output "id" {
description = "returns a string"
value = vsphere_role.this.id
}
output "label" {
description = "returns a string"
value = vsphere_role.this.label
}
output "this" {
value = vsphere_role.this
}
top