Skip to content

Commit 0927d9f

Browse files
committed
examples: improve the examples
1 parent 8ed25af commit 0927d9f

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

examples/complete/main.tf

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
variable "name" {
2-
default = "terraform-example"
3-
}
41

52
data "alicloud_adb_zones" "default" {}
63

74
data "alicloud_vpcs" "default" {
85
name_regex = "^default-NODELETING$"
96
}
107
data "alicloud_vswitches" "default" {
11-
vpc_id = data.alicloud_vpcs.default.ids.0
12-
zone_id = data.alicloud_adb_zones.default.ids.0
8+
vpc_id = data.alicloud_vpcs.default.ids[0]
9+
zone_id = data.alicloud_adb_zones.default.ids[0]
1310
}
1411

1512
module "adb_example" {
1613
source = "../.."
1714

18-
vswitch_id = data.alicloud_vswitches.default.vswitches.0.id
19-
availability_zone = data.alicloud_vswitches.default.vswitches.0.zone_id
20-
db_cluster_version = "3.0"
15+
vswitch_id = data.alicloud_vswitches.default.vswitches[0].id
16+
availability_zone = data.alicloud_vswitches.default.vswitches[0].zone_id
17+
db_cluster_version = null
2118
db_cluster_category = "Cluster"
2219
db_node_class = "C8"
2320
db_node_count = 1
File renamed without changes.

0 commit comments

Comments
 (0)