File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -97,20 +97,34 @@ func testAccCheckSqlserverBasicInstanceExists(n string) resource.TestCheckFunc {
9797 }
9898}
9999
100- const testAccSqlserverBasicInstanceBasic = defaultVpcSubnets + defaultSecurityGroupData
100+ const testAccSqlserverBasicInstanceBasic = defaultSecurityGroupData
101101
102102const testAccSqlserverBasicInstancePostpaid string = testAccSqlserverBasicInstanceBasic + `
103+ variable "az" {
104+ default = "ap-guangzhou-7"
105+ }
106+
107+ data "tencentcloud_vpc_subnets" "gz" {
108+ availability_zone = var.az
109+ is_default = true
110+ }
111+
112+ locals {
113+ vpc_id = data.tencentcloud_vpc_subnets.gz.instance_list.0.vpc_id
114+ subnet_id = data.tencentcloud_vpc_subnets.gz.instance_list.0.subnet_id
115+ }
116+
103117resource "tencentcloud_sqlserver_basic_instance" "test" {
104118 name = "tf_sqlserver_basic_instance"
105- availability_zone = var.default_az
119+ availability_zone = var.az
106120 charge_type = "POSTPAID_BY_HOUR"
107121 vpc_id = local.vpc_id
108122 subnet_id = local.subnet_id
109123 security_groups = [local.sg_id]
110124 project_id = 0
111- memory = 8
125+ memory = 4
112126 storage = 20
113- cpu = 1
127+ cpu = 2
114128 machine_type = "CLOUD_PREMIUM"
115129 maintenance_week_set = [1,2,3]
116130 maintenance_start_time = "09:00"
You can’t perform that action at this time.
0 commit comments