Skip to content

GCLOUD2-11719: Add possibility to attach FIP #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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