Skip to content

Commit

Permalink
Merge pull request #169 from formalco/use_id_field
Browse files Browse the repository at this point in the history
use id instead
  • Loading branch information
ahmb84 authored Oct 28, 2023
2 parents 6d4d354 + ec8dd87 commit c4e805b
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 @@ -141,7 +141,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 @@ -170,7 +169,7 @@ 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)
Expand All @@ -179,8 +178,7 @@ func resourceDatastoreRead(ctx context.Context, d *schema.ResourceData, meta int
d.Set("environment", res.Msg.Datastore.Environment)
d.Set("termination_protection", res.Msg.Datastore.TerminationProtection)

// 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 c4e805b

Please sign in to comment.