Skip to content

Commit

Permalink
Use the schema registry id as the id of the resource
Browse files Browse the repository at this point in the history
  • Loading branch information
Mongey committed Nov 13, 2020
1 parent 6e2cbc3 commit 72858c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ccloud/resource_schema_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func schemaRegistryCreate(d *schema.ResourceData, meta interface{}) error {
return err
}

d.SetId(reg.Name + " " + environment)
d.SetId(reg.ID)
err = d.Set("endpoint", reg.Endpoint)
if err != nil {
return err
Expand All @@ -70,7 +70,7 @@ func schemaRegistryRead(d *schema.ResourceData, meta interface{}) error {

environment := d.Get("environment_id").(string)
log.Printf("[INFO] Reading Schema Registry %s", environment)

env, err := c.GetSchemaRegistry(environment)
if err != nil {
return err
Expand All @@ -87,4 +87,4 @@ func schemaRegistryRead(d *schema.ResourceData, meta interface{}) error {
func schemaRegistryDelete(d *schema.ResourceData, meta interface{}) error {
log.Printf("[INFO] Schema registry cannot be deleted: %s", d.Id())
return nil
}
}

0 comments on commit 72858c6

Please sign in to comment.