Provides a VPC Public Ip Address Pool Cidr Block resource.
For information about VPC Public Ip Address Pool Cidr Block and how to use it, see What is Public Ip Address Pool Cidr Block.
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"
}
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.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.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.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>