From 0822e63ab41e06e33442e729b0c93a73c38ec6d2 Mon Sep 17 00:00:00 2001 From: Artsiom <82237255+ArtsiomAntropau@users.noreply.github.com> Date: Mon, 23 Oct 2023 08:37:35 +0200 Subject: [PATCH] GCLOUD2-11719: Add possibility to attach FIP (#41) * 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 --- docs/resources/loadbalancerv2.md | 1 + gcore/resource_gcore_loadbalancerv2.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/resources/loadbalancerv2.md b/docs/resources/loadbalancerv2.md index f600439..50c200f 100644 --- a/docs/resources/loadbalancerv2.md +++ b/docs/resources/loadbalancerv2.md @@ -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 ### Nested Schema for `timeouts` diff --git a/gcore/resource_gcore_loadbalancerv2.go b/gcore/resource_gcore_loadbalancerv2.go index 1a16d77..a11da0f 100644 --- a/gcore/resource_gcore_loadbalancerv2.go +++ b/gcore/resource_gcore_loadbalancerv2.go @@ -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, @@ -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())