back
terraform {
required_providers {
nsxt = ">= 3.1.1"
}
}
top
module "nsxt_policy_ip_pool" {
source = "./modules/nsxt/r/nsxt_policy_ip_pool"
# description - (optional) is a type of string
description = null
# display_name - (required) is a type of string
display_name = null
# nsx_id - (optional) is a type of string
nsx_id = null
tag = [{
scope = null
tag = null
}]
}
top
variable "description" {
description = "(optional) - Description for this resource"
type = string
default = null
}
variable "display_name" {
description = "(required) - Display name for this resource"
type = string
}
variable "nsx_id" {
description = "(optional) - NSX ID for this resource"
type = string
default = null
}
variable "tag" {
description = "nested block: NestingSet, min items: 0, max items: 0"
type = set(object(
{
scope = string
tag = string
}
))
default = []
}
top
resource "nsxt_policy_ip_pool" "this" {
# description - (optional) is a type of string
description = var.description
# display_name - (required) is a type of string
display_name = var.display_name
# nsx_id - (optional) is a type of string
nsx_id = var.nsx_id
dynamic "tag" {
for_each = var.tag
content {
# scope - (optional) is a type of string
scope = tag.value["scope"]
# tag - (optional) is a type of string
tag = tag.value["tag"]
}
}
}
top
output "id" {
description = "returns a string"
value = nsxt_policy_ip_pool.this.id
}
output "nsx_id" {
description = "returns a string"
value = nsxt_policy_ip_pool.this.nsx_id
}
output "path" {
description = "returns a string"
value = nsxt_policy_ip_pool.this.path
}
output "revision" {
description = "returns a number"
value = nsxt_policy_ip_pool.this.revision
}
output "this" {
value = nsxt_policy_ip_pool.this
}
top