Skip to content

Latest commit

 

History

History
102 lines (79 loc) · 1.75 KB

File metadata and controls

102 lines (79 loc) · 1.75 KB

vsphere_role

back

Index

Terraform

terraform {
  required_providers {
    vsphere = ">= 1.25.0"
  }
}

top

Example Usage

module "vsphere_role" {
  source = "./modules/vsphere/d/vsphere_role"

  # description - (optional) is a type of string
  description = null
  # label - (required) is a type of string
  label = null
  # name - (optional) is a type of string
  name = null
  # role_privileges - (optional) is a type of list of string
  role_privileges = []
}

top

Variables

variable "description" {
  description = "(optional) - Description of the role."
  type        = string
  default     = null
}

variable "label" {
  description = "(required) - The display label of the role."
  type        = string
}

variable "name" {
  description = "(optional) - Name of the role."
  type        = string
  default     = null
}

variable "role_privileges" {
  description = "(optional) - Privileges to be associated with the role"
  type        = list(string)
  default     = null
}

top

Datasource

data "vsphere_role" "this" {
  # description - (optional) is a type of string
  description = var.description
  # label - (required) is a type of string
  label = var.label
  # name - (optional) is a type of string
  name = var.name
  # role_privileges - (optional) is a type of list of string
  role_privileges = var.role_privileges
}

top

Outputs

output "id" {
  description = "returns a string"
  value       = data.vsphere_role.this.id
}

output "this" {
  value = vsphere_role.this
}

top