Skip to content

Commit 5d5f808

Browse files
committed
fix(mariadb): [116318703] support ip port
1 parent a3072f6 commit 5d5f808

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

tencentcloud/services/mariadb/data_source_tc_mariadb_db_instances.go

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,31 @@ func DataSourceTencentCloudMariadbDbInstances() *schema.Resource {
110110
Computed: true,
111111
Description: "db version id.",
112112
},
113+
"vip": {
114+
Type: schema.TypeString,
115+
Computed: true,
116+
Description: "Intranet IP address.",
117+
},
118+
"vport": {
119+
Type: schema.TypeInt,
120+
Computed: true,
121+
Description: "Intranet port.",
122+
},
123+
"internet_domain": {
124+
Type: schema.TypeString,
125+
Computed: true,
126+
Description: "Public network access domain name.",
127+
},
128+
"internet_ip": {
129+
Type: schema.TypeString,
130+
Computed: true,
131+
Description: "Public IP address.",
132+
},
133+
"internet_port": {
134+
Type: schema.TypeInt,
135+
Computed: true,
136+
Description: "Public network port.",
137+
},
113138
"resource_tags": {
114139
Type: schema.TypeList,
115140
Computed: true,
@@ -231,6 +256,21 @@ func dataSourceTencentCloudMariadbDbInstancesRead(d *schema.ResourceData, meta i
231256
if instance.DbVersionId != nil {
232257
instanceMap["db_version_id"] = instance.DbVersionId
233258
}
259+
if instance.Vip != nil {
260+
instanceMap["vip"] = instance.Vip
261+
}
262+
if instance.Vport != nil {
263+
instanceMap["vport"] = instance.Vport
264+
}
265+
if instance.WanDomain != nil {
266+
instanceMap["internet_domain"] = instance.WanDomain
267+
}
268+
if instance.WanVip != nil {
269+
instanceMap["internet_ip"] = instance.WanVip
270+
}
271+
if instance.WanPort != nil {
272+
instanceMap["internet_port"] = instance.WanPort
273+
}
234274
if instance.ResourceTags != nil {
235275
resourceTagsList := []interface{}{}
236276
for _, resourceTags := range instance.ResourceTags {

website/docs/d/mariadb_db_instances.html.markdown

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ In addition to all arguments above, the following attributes are exported:
4141
* `db_version_id` - db version id.
4242
* `instance_id` - instance id.
4343
* `instance_name` - instance name.
44+
* `internet_domain` - Public network access domain name.
45+
* `internet_ip` - Public IP address.
46+
* `internet_port` - Public network port.
4447
* `memory` - meory of instance.
4548
* `project_id` - project id.
4649
* `region` - region.
@@ -49,7 +52,9 @@ In addition to all arguments above, the following attributes are exported:
4952
* `tag_value` - tag value.
5053
* `storage` - storage of instance.
5154
* `subnet_id` - subnet id.
55+
* `vip` - Intranet IP address.
5256
* `vpc_id` - vpc id.
57+
* `vport` - Intranet port.
5358
* `zone` - available zone.
5459

5560

0 commit comments

Comments
 (0)