Skip to content

Commit 8a728bb

Browse files
committed
examples/complete: improve the examples
1 parent 6fe342b commit 8a728bb

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

examples/complete/main.tf

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,24 @@ resource "alicloud_vswitch" "default" {
1414
zone_id = data.alicloud_zones.default.zones.0.id
1515
}
1616

17+
data "alicloud_instance_types" "cloud_essd" {
18+
availability_zone = data.alicloud_zones.default.zones.0.id
19+
cpu_core_count = 4
20+
memory_size = 8
21+
kubernetes_node_role = "Worker"
22+
system_disk_category = "cloud_essd"
23+
}
24+
1725
module "managed-k8s" {
18-
source = "../../"
19-
k8s_name_prefix = "tf-example"
20-
cluster_spec = "ack.pro.small"
21-
vswitch_ids = [alicloud_vswitch.default.id]
22-
k8s_pod_cidr = cidrsubnet("10.0.0.0/8", 8, 36)
23-
k8s_service_cidr = cidrsubnet("172.16.0.0/16", 4, 7)
24-
kubernetes_version = "1.24.6-aliyun.1"
26+
source = "../../"
27+
k8s_name_prefix = "tf-example"
28+
cluster_spec = "ack.pro.small"
29+
vswitch_ids = [alicloud_vswitch.default.id]
30+
k8s_pod_cidr = cidrsubnet("10.0.0.0/8", 8, 36)
31+
k8s_service_cidr = cidrsubnet("172.16.0.0/16", 4, 7)
32+
kubernetes_version = "1.24.6-aliyun.1"
33+
worker_instance_types = [data.alicloud_instance_types.cloud_essd.instance_types.0.id]
34+
worker_disk_category = "cloud_essd"
2535
cluster_addons = [
2636
{
2737
name = "flannel",

0 commit comments

Comments
 (0)