» alicloud_eip

Provides an elastic IP resource.

» Example Usage

# Create a new EIP.
resource "alicloud_eip" "example" {
  bandwidth            = "10"
  internet_charge_type = "PayByBandwidth"

» Module Support

You can use the existing eip module to create several EIP instances and associate them with other resources one-click, like ECS instances, SLB, Nat Gateway and so on.

» Argument Reference

The following arguments are supported:

  • name - (Optional) The name of the EIP instance. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://.
  • description - (Optional) Description of the EIP instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
  • bandwidth - (Optional) Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). If this value is not specified, then automatically sets it to 5 Mbps.
  • internet_charge_type - (Optional, ForceNew) Internet charge type of the EIP, Valid values are PayByBandwidth, PayByTraffic. Default to PayByBandwidth. From version 1.7.1, default to PayByTraffic. It is only PayByBandwidth when instance_charge_type is PrePaid.
  • instance_charge_type - (Optional, ForceNew) Elastic IP instance charge type. Valid values are "PrePaid" and "PostPaid". Default to "PostPaid".
  • period - (Optional, ForceNew) The duration that you will buy the resource, in month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console.
  • isp - (Optional, ForceNew, Available in 1.47.0+) The line type of the Elastic IP instance. Default to BGP. Other type of the isp need to open a whitelist.
  • tags - (Optional, Available in v1.55.3+) A mapping of tags to assign to the resource.
  • resource_group_id - (Optional, ForceNew, Available in 1.58.0+) The Id of resource group which the eip belongs.

» Attributes Reference

The following attributes are exported:

» Import

Elastic IP address can be imported using the id, e.g.

$ terraform import alicloud_eip.example eip-abc12345678