Skip to content

Latest commit

 

History

History
171 lines (138 loc) · 3.43 KB

nsxt_policy_ip_pool_block_subnet.md

File metadata and controls

171 lines (138 loc) · 3.43 KB

nsxt_policy_ip_pool_block_subnet

back

Index

Terraform

terraform {
  required_providers {
    nsxt = ">= 3.1.1"
  }
}

top

Example Usage

module "nsxt_policy_ip_pool_block_subnet" {
  source = "./modules/nsxt/r/nsxt_policy_ip_pool_block_subnet"

  # auto_assign_gateway - (optional) is a type of bool
  auto_assign_gateway = null
  # block_path - (required) is a type of string
  block_path = null
  # 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
  # pool_path - (required) is a type of string
  pool_path = null
  # size - (required) is a type of number
  size = null

  tag = [{
    scope = null
    tag   = null
  }]
}

top

Variables

variable "auto_assign_gateway" {
  description = "(optional) - If true, the first IP in the range will be reserved for gateway"
  type        = bool
  default     = null
}

variable "block_path" {
  description = "(required) - Policy path to the IP Block"
  type        = string
}

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 "pool_path" {
  description = "(required) - Policy path to the IP Pool for this Subnet"
  type        = string
}

variable "size" {
  description = "(required) - Number of addresses"
  type        = number
}

variable "tag" {
  description = "nested block: NestingSet, min items: 0, max items: 0"
  type = set(object(
    {
      scope = string
      tag   = string
    }
  ))
  default = []
}

top

Resource

resource "nsxt_policy_ip_pool_block_subnet" "this" {
  # auto_assign_gateway - (optional) is a type of bool
  auto_assign_gateway = var.auto_assign_gateway
  # block_path - (required) is a type of string
  block_path = var.block_path
  # 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
  # pool_path - (required) is a type of string
  pool_path = var.pool_path
  # size - (required) is a type of number
  size = var.size

  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

Outputs

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

output "nsx_id" {
  description = "returns a string"
  value       = nsxt_policy_ip_pool_block_subnet.this.nsx_id
}

output "path" {
  description = "returns a string"
  value       = nsxt_policy_ip_pool_block_subnet.this.path
}

output "revision" {
  description = "returns a number"
  value       = nsxt_policy_ip_pool_block_subnet.this.revision
}

output "this" {
  value = nsxt_policy_ip_pool_block_subnet.this
}

top