Skip to content

Commit

Permalink
fix(warehouse) - transactional import detect existing credentials (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndopj committed Feb 22, 2024
1 parent 9d9c5c7 commit 603c4b6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions internal/warehouse/transactional_warehouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ func (r *TransactionalWarehouseResource) Schema(ctx context.Context, req resourc
Validators: []validator.String{
stringvalidator.OneOf("POSTGRES", "MYSQL", "SQL-SERVER"),
},
PlanModifiers: []planmodifier.String{
stringplanmodifier.RequiresReplaceIfConfigured(),
},
},
"collector_uuid": schema.StringAttribute{
Required: true,
Expand Down Expand Up @@ -335,7 +332,6 @@ func (r *TransactionalWarehouseResource) ImportState(ctx context.Context, req re
resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("uuid"), idsImported[0])...)
resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("credentials").AtName("connection_uuid"), idsImported[1])...)
resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("collector_uuid"), idsImported[2])...)
resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("credentials"), TransactionalCredentials{})...)
} else {
resp.Diagnostics.AddError("Unexpected Import Identifier", fmt.Sprintf(
"Expected import identifier with format: <warehouse_uuid>,<connection_uuid>,<data_collector_uuid>. Got: %q", req.ID),
Expand Down

0 comments on commit 603c4b6

Please sign in to comment.