Skip to content

Commit f46e720

Browse files
committed
resource/alicloud_realtime_compute_vvp_instance: Added the field resource_id.
1 parent ec19c6a commit f46e720

File tree

4 files changed

+256
-108
lines changed

4 files changed

+256
-108
lines changed

alicloud/resource_alicloud_realtime_compute_vvp_instance.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ func resourceAliCloudRealtimeComputeVvpInstance() *schema.Resource {
122122
Required: true,
123123
ForceNew: true,
124124
},
125+
"resource_id": {
126+
Type: schema.TypeString,
127+
Computed: true,
128+
},
125129
},
126130
}
127131
}
@@ -253,7 +257,7 @@ func resourceAliCloudRealtimeComputeVvpInstanceRead(d *schema.ResourceData, meta
253257
d.Set("status", objectRaw["ClusterStatus"])
254258
d.Set("vpc_id", objectRaw["VpcId"])
255259
d.Set("vvp_instance_name", objectRaw["InstanceName"])
256-
d.Set("zone_id", objectRaw["ZoneId"])
260+
d.Set("resource_id", objectRaw["ResourceId"])
257261
resourceSpecMaps := make([]map[string]interface{}, 0)
258262
resourceSpecMap := make(map[string]interface{})
259263
resourceSpec1Raw := make(map[string]interface{})

alicloud/resource_alicloud_realtime_compute_vvp_instance_test.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ func TestAccAliCloudRealtimeComputeVvpInstance_basic4636(t *testing.T) {
5454
testAccCheck(map[string]string{
5555
"vvp_instance_name": name,
5656
"vpc_id": CHECKSET,
57-
"zone_id": "cn-hangzhou-i",
5857
"vswitch_ids.#": "1",
5958
"payment_type": "PayAsYouGo",
6059
}),
@@ -126,7 +125,7 @@ func TestAccAliCloudRealtimeComputeVvpInstance_basic4636(t *testing.T) {
126125
ResourceName: resourceId,
127126
ImportState: true,
128127
ImportStateVerify: true,
129-
ImportStateVerifyIgnore: []string{"duration", "pricing_cycle"},
128+
ImportStateVerifyIgnore: []string{"duration", "pricing_cycle", "zone_id"},
130129
},
131130
},
132131
})
@@ -220,7 +219,6 @@ func TestAccAliCloudRealtimeComputeVvpInstance_basic4594(t *testing.T) {
220219
"vvp_instance_name": name,
221220
"vpc_id": CHECKSET,
222221
"vswitch_ids.#": "1",
223-
"zone_id": "cn-hangzhou-i",
224222
"payment_type": "Subscription",
225223
"pricing_cycle": "Month",
226224
"duration": "1",
@@ -244,7 +242,7 @@ func TestAccAliCloudRealtimeComputeVvpInstance_basic4594(t *testing.T) {
244242
ResourceName: resourceId,
245243
ImportState: true,
246244
ImportStateVerify: true,
247-
ImportStateVerifyIgnore: []string{"duration", "pricing_cycle"},
245+
ImportStateVerifyIgnore: []string{"duration", "pricing_cycle", "zone_id"},
248246
},
249247
},
250248
})
@@ -326,7 +324,6 @@ func TestAccAliCloudRealtimeComputeVvpInstance_basic4636_twin(t *testing.T) {
326324
testAccCheck(map[string]string{
327325
"vvp_instance_name": name,
328326
"vpc_id": CHECKSET,
329-
"zone_id": "cn-hangzhou-i",
330327
"vswitch_ids.#": "1",
331328
"payment_type": "PayAsYouGo",
332329
}),
@@ -336,7 +333,7 @@ func TestAccAliCloudRealtimeComputeVvpInstance_basic4636_twin(t *testing.T) {
336333
ResourceName: resourceId,
337334
ImportState: true,
338335
ImportStateVerify: true,
339-
ImportStateVerifyIgnore: []string{"duration", "pricing_cycle"},
336+
ImportStateVerifyIgnore: []string{"duration", "pricing_cycle", "zone_id"},
340337
},
341338
},
342339
})
@@ -396,7 +393,6 @@ func TestAccAliCloudRealtimeComputeVvpInstance_basic4594_twin(t *testing.T) {
396393
"vvp_instance_name": name,
397394
"vpc_id": CHECKSET,
398395
"vswitch_ids.#": "1",
399-
"zone_id": "cn-hangzhou-i",
400396
"payment_type": "Subscription",
401397
"pricing_cycle": "Month",
402398
"duration": "1",
@@ -407,7 +403,7 @@ func TestAccAliCloudRealtimeComputeVvpInstance_basic4594_twin(t *testing.T) {
407403
ResourceName: resourceId,
408404
ImportState: true,
409405
ImportStateVerify: true,
410-
ImportStateVerifyIgnore: []string{"duration", "pricing_cycle"},
406+
ImportStateVerifyIgnore: []string{"duration", "pricing_cycle", "zone_id"},
411407
},
412408
},
413409
})

0 commit comments

Comments
 (0)