Skip to content

Commit e49efee

Browse files
lsy1968shanye997
authored andcommitted
201-use-case-create-an-ens-eip-instance
1 parent 59e4ec3 commit e49efee

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## Introduction
2+
3+
<!-- DOCS_DESCRIPTION_CN -->
4+
本示例用于在阿里云上创建ENS EIP实例。
5+
详情可查看[创建ENS EIP实例](https://help.aliyun.com/document_detail/2833660.html)
6+
<!-- DOCS_DESCRIPTION_CN -->
7+
8+
<!-- DOCS_DESCRIPTION_EN -->
9+
This example is used to create an ENS EIP instance on Alibaba Cloud.
10+
More details in [Create an ENS EIP instance](https://help.aliyun.com/document_detail/2833660.html).
11+
<!-- DOCS_DESCRIPTION_EN -->
12+
13+
<!-- BEGIN_TF_DOCS -->
14+
## Providers
15+
16+
| Name | Version |
17+
|------|---------|
18+
| <a name="provider_alicloud"></a> [alicloud](#provider\_alicloud) | n/a |
19+
20+
## Modules
21+
22+
No modules.
23+
24+
## Resources
25+
26+
| Name | Type |
27+
|------|------|
28+
| [alicloud_ens_eip.default](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/ens_eip) | resource |
29+
30+
## Inputs
31+
32+
| Name | Description | Type | Default | Required |
33+
|------|-------------|------|---------|:--------:|
34+
| <a name="input_name"></a> [name](#input\_name) | n/a | `string` | `"terraform-example"` | no |
35+
<!-- END_TF_DOCS -->
36+
37+
## Documentation
38+
<!-- docs-link -->
39+
40+
The template is based on Aliyun document: [Create an ENS EIP instance](https://help.aliyun.com/document_detail/2833660.html)
41+
42+
<!-- docs-link -->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
variable "name" {
2+
default = "terraform-example"
3+
}
4+
# 创建ENS EIP资源
5+
resource "alicloud_ens_eip" "default" {
6+
# (可选)EIP的描述。
7+
description = "EipDescription_autotest"
8+
# (可选,计算得出)EIP的峰值带宽。规则:默认值:5,取值范围:5~10000
9+
bandwidth = "5"
10+
# (可选,强制新建)互联网服务提供商
11+
isp = "cmcc"
12+
# (必需,强制新建)EIP实例的计费类型。值:按需付费(PayAsYouGo)
13+
payment_type = "PayAsYouGo"
14+
# (必需,强制新建)ENS节点ID。
15+
ens_region_id = "cn-chenzhou-telecom_unicom_cmcc"
16+
# 可选)EIP实例的名称。
17+
eip_name = var.name
18+
# (必需,强制新建)EIP实例的计费类型。有效值:95BandwidthByMonth。
19+
internet_charge_type = "95BandwidthByMonth"
20+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform {
2+
required_providers {
3+
alicloud = {
4+
source = "aliyun/alicloud"
5+
}
6+
}
7+
}

0 commit comments

Comments
 (0)