Skip to content

Commit

Permalink
Renamed "id" to "key" in ACL resource.
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomocariello committed Jul 20, 2017
1 parent 1f39284 commit 71798dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions provider/resource_consul_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func resourceConsulAcl() *schema.Resource {
Optional: true,
},

"id": {
"key": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Expand Down Expand Up @@ -103,7 +103,7 @@ func resourceConsulAclCreate(d *schema.ResourceData, meta interface{}) error {
aclClient := newACLClient(acl, dc, config.Token)

aclEntry := &consulapi.ACLEntry{
ID: d.Get("id").(string),
ID: d.Get("key").(string),
Name: d.Get("name").(string),
Type: d.Get("type").(string),
Rules: d.Get("rules").(string),
Expand Down Expand Up @@ -142,7 +142,7 @@ func resourceConsulAclUpdate(d *schema.ResourceData, meta interface{}) error {
aclClient := newACLClient(acl, dc, config.Token)

aclEntry := &consulapi.ACLEntry{
ID: d.Get("id").(string),
ID: d.Get("key").(string),
Name: d.Get("name").(string),
Type: d.Get("type").(string),
Rules: d.Get("rules").(string),
Expand Down Expand Up @@ -184,7 +184,7 @@ func resourceConsulAclRead(d *schema.ResourceData, meta interface{}) error {
return nil
}

d.Set("id", aclEntry.ID)
d.Set("key", aclEntry.ID)
d.Set("name", aclEntry.Name)
d.Set("type", aclEntry.Type)
d.Set("rules", aclEntry.Rules)
Expand Down

0 comments on commit 71798dc

Please sign in to comment.