Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mikatong committed Jan 30, 2024
1 parent 0d587ea commit 22f8732
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,17 @@ func ResourceTencentCloudLighthouseInstance() *schema.Resource {
Computed: true,
Description: "Firewall template ID. If this parameter is not specified, the default firewall policy is used.",
},
"public_address": {
Type: schema.TypeString,
"public_addresses": {
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
Description: "Public address.",
Description: "Public addresses.",
},
"private_address": {
Type: schema.TypeString,
"private_addresses": {
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
Description: "Private address.",
Description: "Private addresses.",
},
},
}
Expand Down Expand Up @@ -423,11 +425,11 @@ func resourceTencentCloudLighthouseInstanceRead(d *schema.ResourceData, meta int
}

if len(instance.PublicAddresses) > 0 {
_ = d.Set("public_address", instance.PublicAddresses[0])
_ = d.Set("public_addresses", instance.PublicAddresses)
}

if len(instance.PrivateAddresses) > 0 {
_ = d.Set("private_address", instance.PrivateAddresses[0])
_ = d.Set("private_addresses", instance.PrivateAddresses)
}

return nil
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/lighthouse_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ The `volumes` object of `containers` supports the following:
In addition to all arguments above, the following attributes are exported:

* `id` - ID of the resource.
* `private_address` - Private address.
* `public_address` - Public address.
* `private_addresses` - Private addresses.
* `public_addresses` - Public addresses.


## Import
Expand Down

0 comments on commit 22f8732

Please sign in to comment.