alicloud_eip
Provides an elastic IP resource.
-> DEPRECATED: This resource has been deprecated from version 1.126.0. Please use new resource alicloud_eip_address.
-> NOTE: The resource only supports to create PostPaid PayByTraffic or PrePaid PayByBandwidth elastic IP for international account. Otherwise, you will happened error COMMODITY.INVALID_COMPONENT.
Your account is international if you can use it to login in International Web Console.
-> NOTE: From version 1.10.1, this resource supports creating "PrePaid" EIP. In addition, it supports setting EIP name and description.
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- (Deprecated) It has been deprecated from version 1.126.0 and using new attributeaddress_nameinstead.address_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 arePayByBandwidth,PayByTraffic. Default toPayByBandwidth. NOTE: From version1.7.1to1.125.0, it defaults toPayByTraffic. It is only "PayByBandwidth" wheninstance_charge_typeis PrePaid.instance_charge_type- (Depreacted, Optional, ForceNew) (It has been deprecated from version 1.126.0 and using new attributepayment_typeinstead) Elastic IP instance charge type. Valid values are "PrePaid" and "PostPaid". Default to "PostPaid".payment_type- (Optional, ForceNew) The billing method of the EIP. Valid values:SubscriptionandPayAsYouGo. Default value isPayAsYouGo.period- (Optional) The duration that you will buy the resource, in month. It is valid wheninstance_charge_typeisPrePaid. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify "period" and you can do that via web console. NOTE: The attributeperiodis only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means runningterraform applywill not effect the resource.isp- (Optional, ForceNew, Available in 1.47.0+) The line type of the Elastic IP instance. Default toBGP. 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, Available in 1.58.0+, Modifiable in 1.115.0+) The Id of resource group which the eip belongs.deletion_protection- (Optional, Available in v1.124.4+) Whether enable the deletion protection or not. Default value:false.- true: Enable deletion protection.
- false: Disable deletion protection.
Attributes Reference
The following attributes are exported:
id- The EIP ID.status- The EIP current status.ip_address- The elastic ip address
Import
Elastic IP address can be imported using the id, e.g.
$ terraform import alicloud_eip_address.example eip-abc12345678