» alicloud_common_bandwidth_package_attachment

Provides an Alicloud Common Bandwidth Package Attachment resource for associating Common Bandwidth Package to EIP Instance.

For information about common bandwidth package and how to use it, see What is Common Bandwidth Package.

» Example Usage

Basic Usage

resource "alicloud_common_bandwidth_package" "foo" {
  bandwidth   = "2"
  name        = "test_common_bandwidth_package"
  description = "test_common_bandwidth_package"
}

resource "alicloud_eip" "foo" {
  bandwidth            = "2"
  internet_charge_type = "PayByBandwidth"
}

resource "alicloud_common_bandwidth_package_attachment" "foo" {
  bandwidth_package_id = "${alicloud_common_bandwidth_package.foo.id}"
  instance_id          = "${alicloud_eip.foo.id}"
}

» Argument Reference

The following arguments are supported:

  • bandwidth_package_id - (Required, ForceNew) The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.
  • instance_id - (Required, ForceNew) The instance_id of the common bandwidth package attachment, the field can't be changed.

» Attributes Reference

The following attributes are exported:

  • id - The ID of the common bandwidth package attachment id and formates as <bandwidth_package_id>:<instance_id>.

» Import

The common bandwidth package attachemnt can be imported using the id, e.g.

$ terraform import alicloud_common_bandwidth_package_attachment.foo cbwp-abc123456:eip-abc123456