diff --git a/internal/auth0/connection/resource_client.go b/internal/auth0/connection/resource_client.go index 2a625d5b3..8652f5c8a 100644 --- a/internal/auth0/connection/resource_client.go +++ b/internal/auth0/connection/resource_client.go @@ -8,7 +8,6 @@ import ( "github.com/auth0/go-auth0/management" "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/auth0/terraform-provider-auth0/internal/mutex" @@ -79,7 +78,7 @@ func createConnectionClient(ctx context.Context, data *schema.ResourceData, meta return diag.FromErr(err) } - data.SetId(id.UniqueId()) + data.SetId(connectionID + ":" + clientID) return readConnectionClient(ctx, data, meta) } diff --git a/internal/auth0/organization/resource_connection.go b/internal/auth0/organization/resource_connection.go index a58afd76e..e679ac082 100644 --- a/internal/auth0/organization/resource_connection.go +++ b/internal/auth0/organization/resource_connection.go @@ -8,7 +8,6 @@ import ( "github.com/auth0/go-auth0/management" "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/auth0/terraform-provider-auth0/internal/mutex" @@ -83,7 +82,7 @@ func createOrganizationConnection(ctx context.Context, data *schema.ResourceData return diag.FromErr(err) } - data.SetId(id.UniqueId()) + data.SetId(organizationID + ":" + connectionID) return readOrganizationConnection(ctx, data, meta) } diff --git a/internal/auth0/organization/resource_member.go b/internal/auth0/organization/resource_member.go index 250baed73..c0975b927 100644 --- a/internal/auth0/organization/resource_member.go +++ b/internal/auth0/organization/resource_member.go @@ -7,7 +7,6 @@ import ( "github.com/auth0/go-auth0/management" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/auth0/terraform-provider-auth0/internal/mutex" @@ -64,7 +63,7 @@ func createOrganizationMember(ctx context.Context, d *schema.ResourceData, m int return diag.FromErr(err) } - d.SetId(id.UniqueId()) + d.SetId(orgID + ":" + userID) if err := assignRoles(d, api); err != nil { return diag.FromErr(fmt.Errorf("failed to assign roles to organization member: %w", err))