Skip to content

Commit

Permalink
FIX: [TF] output from Terraform's "cloudconnexa_connector" and from S…
Browse files Browse the repository at this point in the history
…wagger has different value of "ID" field
  • Loading branch information
michaelfmnk committed Jul 29, 2024
1 parent febada5 commit 202acf4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cloudconnexa/data_source_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package cloudconnexa

import (
"context"
"strconv"
"time"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"
Expand Down Expand Up @@ -71,7 +68,7 @@ func dataSourceConnectorRead(ctx context.Context, d *schema.ResourceData, m inte
if err != nil {
return append(diags, diag.FromErr(err)...)
}
d.Set("connector_id", connector.Id)
d.SetId(connector.Id)
d.Set("name", connector.Name)
d.Set("description", connector.Description)
d.Set("network_item_id", connector.NetworkItemId)
Expand All @@ -84,6 +81,5 @@ func dataSourceConnectorRead(ctx context.Context, d *schema.ResourceData, m inte
return append(diags, diag.FromErr(err)...)
}
d.Set("profile", profile)
d.SetId(strconv.FormatInt(time.Now().Unix(), 10))
return diags
}

0 comments on commit 202acf4

Please sign in to comment.