Skip to content

Commit ac471dc

Browse files
author
alibaba
committed
Added test files
1 parent 705c86d commit ac471dc

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

example/main.tf

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
variable "description" {
2+
description = "The name of a new description."
3+
type = string
4+
default = "Test new adb."
5+
}
6+
7+
data "alicloud_zones" "default" {
8+
available_resource_creation = "ADB"
9+
enable_details = true
10+
}
11+
12+
resource "alicloud_vpc" "default" {
13+
vpc_name = "terraform_test"
14+
cidr_block = "172.16.0.0/16"
15+
}
16+
17+
resource "alicloud_vswitch" "default" {
18+
vswitch_name = "terraform_test"
19+
cidr_block = "172.16.0.0/16"
20+
vpc_id = alicloud_vpc.default.id
21+
zone_id = data.alicloud_zones.default.zones.0.id
22+
}
23+
24+
module "example" {
25+
source = "../"
26+
description = var.description
27+
vswitch_id = alicloud_vswitch.default.id
28+
availability_zone = data.alicloud_zones.default.zones.0.id
29+
}

example/outputs.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
output "this_adb_description" {
2+
value = module.example.this_adb_description
3+
}

0 commit comments

Comments
 (0)