alicloud_vpc_ipam_ipam_pool_cidr

更新时间:

Provides a Vpc Ipam Ipam Pool Cidr resource.

Ipam address pool preset CIDR.

For information about Vpc Ipam Ipam Pool Cidr and how to use it, see What is Ipam Pool Cidr.

-> NOTE: Available since v1.234.0.

Example Usage

Basic Usage


variable "name" {
  default = "terraform-example"
}

provider "alicloud" {
  region = "cn-hangzhou"
}

resource "alicloud_vpc_ipam_ipam" "defaultIpam" {
  operating_region_list = ["cn-hangzhou"]
}

resource "alicloud_vpc_ipam_ipam_pool" "defaultIpamPool" {
  ipam_scope_id  = alicloud_vpc_ipam_ipam.defaultIpam.private_default_scope_id
  pool_region_id = alicloud_vpc_ipam_ipam.defaultIpam.region_id
  ip_version     = "IPv4"
}


resource "alicloud_vpc_ipam_ipam_pool_cidr" "default" {
  cidr         = "10.0.0.0/8"
  ipam_pool_id = alicloud_vpc_ipam_ipam_pool.defaultIpamPool.id
}

Argument Reference

The following arguments are supported:

  • cidr - (Required, ForceNew) The CIDR address segment to be preset.

-> NOTE: currently, only IPv4 address segments are supported.

  • ipam_pool_id - (Required, ForceNew) The ID of the IPAM pool instance.

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.The value is formulated as <ipam_pool_id>:<cidr>.
  • status - The status of the resource

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 5 mins) Used when create the Ipam Pool Cidr.
  • delete - (Defaults to 5 mins) Used when delete the Ipam Pool Cidr.

Import

Vpc Ipam Ipam Pool Cidr can be imported using the id, e.g.

$ terraform import alicloud_vpc_ipam_ipam_pool_cidr.example <ipam_pool_id>:<cidr>