File tree Expand file tree Collapse file tree 4 files changed +25
-12
lines changed
Actiontrail/101-actiontrail-trail-docs-Example
Application_Real-Time_Monitoring_Service(ARMS)/101-arms-prometheus-monitoring-docs-Example
Cloud_Enterprise_Network(CEN)/101-cen-transit-router-vpn-attachment-docs-Example
ECS/101-use-case-create-an-ecs-instance Expand file tree Collapse file tree 4 files changed +25
-12
lines changed Original file line number Diff line number Diff line change @@ -24,5 +24,5 @@ data "alicloud_ram_roles" "example" {
24
24
resource "alicloud_actiontrail_trail" "example" {
25
25
trail_name = var. name
26
26
sls_write_role_arn = data. alicloud_ram_roles . example . roles . 0 . arn
27
- sls_project_arn = " acs:log:${ data . alicloud_regions . example . regions . 0 . id } :${ data . alicloud_account . example . id } :project/${ alicloud_log_project . example . name } "
27
+ sls_project_arn = " acs:log:${ data . alicloud_regions . example . regions . 0 . id } :${ data . alicloud_account . example . id } :project/${ alicloud_log_project . example . project_name } "
28
28
}
Original file line number Diff line number Diff line change @@ -57,13 +57,13 @@ resource "alicloud_key_pair" "default" {
57
57
}
58
58
59
59
resource "alicloud_cs_kubernetes_node_pool" "default" {
60
- name = " desired_size"
60
+ node_pool_name = " desired_size"
61
61
cluster_id = alicloud_cs_managed_kubernetes. default . id
62
62
vswitch_ids = [alicloud_vswitch . vswitch . id ]
63
63
instance_types = [data . alicloud_instance_types . default . instance_types . 0 . id ]
64
64
system_disk_category = " cloud_efficiency"
65
65
system_disk_size = 40
66
- key_name = alicloud_key_pair. default . key_name
66
+ key_name = alicloud_key_pair. default . key_pair_name
67
67
desired_size = 2
68
68
}
69
69
96
96
matchLabels:
97
97
app: tomcat
98
98
EOF
99
- }
99
+ }
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ resource "alicloud_cen_transit_router" "example" {
14
14
}
15
15
16
16
resource "alicloud_vpn_customer_gateway" "example" {
17
- name = var. name
18
- ip_address = " 42.104.22.210"
19
- asn = " 45014"
20
- description = var. name
17
+ customer_gateway_name = var. name
18
+ ip_address = " 42.104.22.210"
19
+ asn = " 45014"
20
+ description = var. name
21
21
}
22
22
23
23
resource "alicloud_vpn_gateway_vpn_attachment" "example" {
@@ -81,4 +81,4 @@ resource "alicloud_cen_transit_router_vpn_attachment" "example" {
81
81
zone {
82
82
zone_id = data. alicloud_cen_transit_router_available_resources . default . resources . 0 . master_zones . 0
83
83
}
84
- }
84
+ }
Original file line number Diff line number Diff line change
1
+ variable "region" {
2
+ default = " cn-beijing"
3
+ }
4
+
5
+ variable "instance_type" {
6
+ default = " ecs.n4.tiny"
7
+ }
8
+
9
+ variable "image_id" {
10
+ default = " ubuntu_18_04_64_20G_alibase_20190624.vhd"
11
+ }
12
+
1
13
provider "alicloud" {
2
- region = " cn-beijing "
14
+ region = var . region
3
15
}
4
16
5
17
data "alicloud_zones" "default" {
6
18
available_disk_category = " cloud_efficiency"
7
19
available_resource_creation = " VSwitch"
20
+ available_instance_type = var. instance_type
8
21
}
9
22
10
23
resource "alicloud_vpc" "vpc" {
@@ -28,9 +41,9 @@ resource "alicloud_instance" "instance" {
28
41
availability_zone = data. alicloud_zones . default . zones . 0 . id
29
42
security_groups = alicloud_security_group. default . * . id
30
43
# series III
31
- instance_type = " ecs.n4.large "
44
+ instance_type = var . instance_type
32
45
system_disk_category = " cloud_efficiency"
33
- image_id = " ubuntu_18_04_64_20G_alibase_20190624.vhd "
46
+ image_id = var . image_id
34
47
instance_name = " test_foo"
35
48
vswitch_id = alicloud_vswitch. vsw . id
36
49
internet_max_bandwidth_out = 10
You can’t perform that action at this time.
0 commit comments