» nsxt_policy_ip_pool_block_subnet

This resource provides a means to configure IP Pool Block Subnets in NSX Policy.

» Example Usage

resource "nsxt_policy_ip_pool_block_subnet" "block_subnet1" {
  display_name        = "block-subnet1"
  pool_path           = nsxt_policy_ip_pool.pool1.path
  block_path          = nsxt_policy_ip_block.block1.path
  size                = 8
  auto_assign_gateway = false

  tag {
    scope = "color"
    tag   = "blue"

  tag {
    scope = "env"
    tag   = "test"

» Argument Reference

The following arguments are supported:

  • display_name - (Required) The display name for the Block Subnet.
  • pool_path - (Required) The Policy path to the IP Pool for this Block Subnet.
  • block_path - (Required) The Policy path to the IP Block for this Block Subnet.
  • nsx_id - (Optional) The NSX ID of this resource. If set, this ID will be used to create the resource.
  • size - (Required) The size of this Block Subnet. Must be a power of 2
  • description - (Optional) Description of the resource.
  • tag - (Optional) A list of scope + tag pairs to associate with this Block Subnet.
  • auto_assign_gateway - (Optional) A boolean flag to toggle auto-assignment of the Gateway IP for this Subnet

» Attributes Reference

In addition to arguments listed above, the following attributes are exported:

  • id - ID of this Block Subnet.
  • revision - Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
  • path - The NSX path of the resource.

» Importing

An existing Block can be imported into this resource, via the following command:

terraform import nsxt_policy_ip_pool_block_subnet.block_subnet1 pool-id/subnet-id

The above would import NSX Block Subnet as a resource named block_subnet1 with the NSX ID subnet-id in the IP Pool pool-id, where subnet-id is NSX ID of Block Subnet and pool-id is the IP Pool ID the Subnet is in.