Skip to content

Commit

Permalink
use id instead
Browse files Browse the repository at this point in the history
  • Loading branch information
VladyslavLukyanenko committed Oct 21, 2023
1 parent 44b0112 commit ec8dd87
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions formal/resources/resource_datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ func resourceDatastoreCreate(ctx context.Context, d *schema.ResourceData, meta i
return diag.FromErr(err)
}

// DsId is the UUID type id. See GetDatastoreInfraByDatastoreID in admin-api for more details
d.SetId(res.Msg.Id)

resourceDatastoreRead(ctx, d, meta)
Expand Down Expand Up @@ -161,16 +160,15 @@ func resourceDatastoreRead(ctx context.Context, d *schema.ResourceData, meta int
return diag.FromErr(err)
}

d.Set("id", res.Msg.Datastore.DatastoreId)
d.Set("id", res.Msg.Datastore.Id)
d.Set("name", res.Msg.Datastore.Name)
d.Set("hostname", res.Msg.Datastore.Hostname)
d.Set("port", res.Msg.Datastore.Port)
d.Set("technology", res.Msg.Datastore.Technology)
d.Set("created_at", res.Msg.Datastore.CreatedAt.AsTime().Unix())
d.Set("environment", res.Msg.Datastore.Environment)

// DsId is the UUID type id. See GetDatastoreInfraByDatastoreID in admin-api for more details
d.SetId(res.Msg.Datastore.DatastoreId)
d.SetId(res.Msg.Datastore.Id)

return diags
}
Expand Down

0 comments on commit ec8dd87

Please sign in to comment.