Provides a cbwp Common Bandwidth Package Attachment resource. -> NOTE: Terraform will auto build common bandwidth package attachment while it uses alicloud_common_bandwidth_package_attachment
to build a common bandwidth package attachment resource.
For information about common bandwidth package and how to use it, see What is Common Bandwidth Package.
For information about cbwp Common Bandwidth Package Attachment and how to use it, see What is Common Bandwidth Package Attachment.
Basic Usage
variable "name" {
default = "terraform-example"
}
resource "alicloud_common_bandwidth_package" "default" {
bandwidth = 3
internet_charge_type = "PayByBandwidth"
}
resource "alicloud_eip_address" "default" {
bandwidth = "3"
internet_charge_type = "PayByTraffic"
}
resource "alicloud_common_bandwidth_package_attachment" "default" {
bandwidth_package_id = alicloud_common_bandwidth_package.default.id
instance_id = alicloud_eip_address.default.id
bandwidth_package_bandwidth = "2"
ip_type = "EIP"
}
The following arguments are supported:
bandwidth_package_bandwidth
- (Optional, Computed) The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.bandwidth_package_id
- (Required, ForceNew) The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.cancel_common_bandwidth_package_ip_bandwidth
- (Optional) Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.instance_id
- (Required, ForceNew) The instance_id of the common bandwidth package attachment, the field can't be changed.ip_type
- (Optional, Available since v1.211.0) IP type. Set the value to EIP, which indicates that the EIP is added to the Internet shared bandwidth.The following attributes are exported:
id
- The ID of the resource supplied above.The value is formulated as <bandwidth_package_id>:<instance_id>
.status
- The status of the Internet Shared Bandwidth instance.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Common Bandwidth Package Attachment.delete
- (Defaults to 5 mins) Used when delete the Common Bandwidth Package Attachment.update
- (Defaults to 5 mins) Used when update the Common Bandwidth Package Attachment.cbwp Common Bandwidth Package Attachment can be imported using the id, e.g.
$ terraform import alicloud_common_bandwidth_package_attachment.example <bandwidth_package_id>:<instance_id>