Skip to content

Commit

Permalink
Rename id to object_id since id is a reserved attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
DRuggeri committed Aug 16, 2018
1 parent 85a66b7 commit 9b83ade
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion restapi/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func make_api_object(d *schema.ResourceData, m interface{}) (*api_object, error)
delete_path := d.Get("path").(string) + "/{id}"

/* Allow user to specify the ID manually */
id := d.Get("id").(string)
id := d.Get("object_id").(string)
if id == "" {
/* If not specified, see if terraform has an ID */
id = d.Id()
Expand Down
2 changes: 1 addition & 1 deletion restapi/resource_api_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func resourceRestApi() *schema.Resource {
Description: "Defaults to `path/{id}`. The API path that represents where to DESTROY (DELETE) objects of this type on the API server. The string `{id}` will be replaced with the terraform ID of the object.",
Optional: true,
},
"id": &schema.Schema{
"object_id": &schema.Schema{
Type: schema.TypeString,
Description: "Defaults to the id learned by the provider during normal operations and `id_attribute`. Allows you to set the id manually. This is used in conjunction with the `*_path` attributes.",
Optional: true,
Expand Down

0 comments on commit 9b83ade

Please sign in to comment.