From 731a6f2e2db60c1383621420f73dbced7fa649d1 Mon Sep 17 00:00:00 2001 From: Oleksandr Lytvyn Date: Thu, 1 Aug 2024 15:20:46 +0300 Subject: [PATCH] Fix cloudconnexa_vpn_region data source (#39) --- cloudconnexa/data_source_vpn_region.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloudconnexa/data_source_vpn_region.go b/cloudconnexa/data_source_vpn_region.go index 550a265..48c343b 100644 --- a/cloudconnexa/data_source_vpn_region.go +++ b/cloudconnexa/data_source_vpn_region.go @@ -2,6 +2,7 @@ package cloudconnexa import ( "context" + "github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -45,7 +46,7 @@ func dataSourceVpnRegion() *schema.Resource { func dataSourceVpnRegionRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { c := m.(*cloudconnexa.Client) var diags diag.Diagnostics - vpnRegionId := d.Get("region_id").(string) + vpnRegionId := d.Get("id").(string) vpnRegion, err := c.VPNRegions.GetVpnRegion(vpnRegionId) if err != nil { return append(diags, diag.FromErr(err)...)