Skip to content

Commit fead537

Browse files
committed
resource/alicloud_drds_instance: set required attributes
1 parent a5ffd57 commit fead537

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

alicloud/resource_alicloud_drds_instance.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ func resourceAliCloudDRDSInstanceRead(d *schema.ResourceData, meta interface{})
216216
d.Set("zone_id", data.ZoneId)
217217
d.Set("description", data.Description)
218218
d.Set("vpc_id", data.Vips.Vip[0].VpcId)
219+
d.Set("vswitch_id", data.Vips.Vip[0].VswitchId)
219220
var connectionString, port string
220221
for _, vip := range data.Vips.Vip {
221222
if vip.Type == "intranet" {
@@ -227,6 +228,8 @@ func resourceAliCloudDRDSInstanceRead(d *schema.ResourceData, meta interface{})
227228
d.Set("connection_string", connectionString)
228229
d.Set("port", port)
229230
d.Set("mysql_version", data.MysqlVersion)
231+
d.Set("specification", data.InstanceSpec)
232+
d.Set("instance_series", data.InstanceSeries)
230233
return nil
231234
}
232235

website/docs/r/drds_instance.html.markdown

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ The following arguments are supported:
8484
* `vpc_id` - (Optional, ForceNew, Available since v1.185.0) The id of the VPC.
8585
* `mysql_version` - (Optional, ForceNew, Available since v1.201.0) The MySQL version supported by the instance, with the following range of values. `5`: Fully compatible with MySQL 5.x (default) `8`: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
8686

87+
## Attributes Reference
88+
89+
The following attributes are exported:
90+
91+
* `id` - The DRDS instance ID.
92+
* `connection_string` - (Available since v1.196.0) The connection string of the DRDS instance.
93+
* `port` - (Available since v1.196.0) The connection port of the DRDS instance.
94+
95+
8796
## Timeouts
8897

8998
-> **NOTE:** Available since v1.49.0.
@@ -92,15 +101,6 @@ The `timeouts` block allows you to specify [timeouts](https://developer.hashicor
92101

93102
* `create` - (Defaults to 10 mins) Used when creating the drds instance (until it reaches running status).
94103
* `delete` - (Defaults to 10 mins) Used when terminating the drds instance.
95-
96-
97-
## Attributes Reference
98-
99-
The following attributes are exported:
100-
101-
* `id` - The DRDS instance ID.
102-
* `connection_string` - (Available since v1.196.0) The connection string of the DRDS instance.
103-
* `port` - (Available since v1.196.0) The connection port of the DRDS instance.
104104

105105

106106
## Import

0 commit comments

Comments
 (0)