alicloud_vpc_public_ip_address_pool_cidr_block

更新时间:

Provides a VPC Public Ip Address Pool Cidr Block resource. -> NOTE: Only users who have the required permissions can use the IP address pool feature of Elastic IP Address (EIP). To apply for the required permissions, submit a ticket.

For information about VPC Public Ip Address Pool Cidr Block and how to use it, see What is Public Ip Address Pool Cidr Block.

-> NOTE: Available since v1.189.0.

Example Usage

Basic Usage


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

variable "name" {
  default = "tf-example"
}
data "alicloud_resource_manager_resource_groups" "default" {
  status = "OK"
}
resource "alicloud_vpc_public_ip_address_pool" "default" {
  description                 = var.name
  public_ip_address_pool_name = var.name
  isp                         = "BGP"
  resource_group_id           = data.alicloud_resource_manager_resource_groups.default.ids.0
}

resource "alicloud_vpc_public_ip_address_pool_cidr_block" "default" {
  public_ip_address_pool_id = alicloud_vpc_public_ip_address_pool.default.id
  cidr_block                = "47.118.126.0/25"
}

Argument Reference

The following arguments are supported:

  • cidr_block - (Optional, ForceNew, Computed) The CIDR block.
  • cidr_mask - (Optional, Available since v1.219.0) IP address and network segment mask. After you enter the mask, the system automatically allocates the IP address network segment. Value range: 24 to 28. -> NOTE: CidrBlock and CidrMask cannot be configured at the same time. Select one of them to configure.
  • public_ip_address_pool_id - (Required, ForceNew) The ID of the VPC Public IP address pool.

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.The value is formulated as <public_ip_address_pool_id>:<cidr_block>.
  • create_time - The creation time of the resource.
  • status - The status of the VPC Public Ip Address Pool Cidr Block.

Timeouts

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

  • create - (Defaults to 5 mins) Used when create the Public Ip Address Pool Cidr Block.
  • delete - (Defaults to 5 mins) Used when delete the Public Ip Address Pool Cidr Block.

Import

VPC Public Ip Address Pool Cidr Block can be imported using the id, e.g.

$ terraform import alicloud_vpc_public_ip_address_pool_cidr_block.example <public_ip_address_pool_id>:<cidr_block>