Skip to content

Commit

Permalink
GCLOUD2-11719: Add possibility to attach FIP (#41)
Browse files Browse the repository at this point in the history
* GCLOUD2-11719: Add possibility to attach FIP

* GCLOUD2-11719: Add possibility to attach FIP

* GCLOUD2-11719: Add possibility to attach FIP

* GCLOUD2-11719: Add possibility to attach FIP
  • Loading branch information
ArtsiomAntropau authored Oct 23, 2023
1 parent 6d9e7c5 commit 0822e63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/resources/loadbalancerv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ resource "gcore_loadbalancerv2" "lb" {
- `id` (String) The ID of this resource.
- `metadata_read_only` (List of Object) (see [below for nested schema](#nestedatt--metadata_read_only))
- `vip_address` (String) Load balancer IP address
- `vip_port_id` (String) Load balancer Port ID

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`
Expand Down
6 changes: 6 additions & 0 deletions gcore/resource_gcore_loadbalancerv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ func resourceLoadBalancerV2() *schema.Resource {
Description: "Load balancer IP address",
Computed: true,
},
"vip_port_id": &schema.Schema{
Type: schema.TypeString,
Description: "Load balancer Port ID",
Computed: true,
},
"last_updated": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -217,6 +222,7 @@ func resourceLoadBalancerV2Read(ctx context.Context, d *schema.ResourceData, m i
d.Set("region_id", lb.RegionID)
d.Set("name", lb.Name)
d.Set("flavor", lb.Flavor.FlavorName)
d.Set("vip_port_id", lb.VipPortID)

if lb.VipAddress != nil {
d.Set("vip_address", lb.VipAddress.String())
Expand Down

0 comments on commit 0822e63

Please sign in to comment.