Skip to content

Commit

Permalink
Role Assignment - Treat name as case insensitive
Browse files Browse the repository at this point in the history
When the wrong case is used for a role name, e.g. acrpull instead of the
correct AcrPull, azure will accept the request and return the correct
casing. This results in Terraform believing it needs to update the
resource incorrectly.
  • Loading branch information
kiall committed May 22, 2019
1 parent a8f0ba2 commit 006cfb1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions azurerm/resource_arm_role_assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ func resourceArmRoleAssignment() *schema.Resource {
},

"role_definition_name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ConflictsWith: []string{"role_definition_id"},
ValidateFunc: validateRoleDefinitionName,
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ConflictsWith: []string{"role_definition_id"},
DiffSuppressFunc: suppress.CaseDifference,
ValidateFunc: validateRoleDefinitionName,
},

"principal_id": {
Expand Down

0 comments on commit 006cfb1

Please sign in to comment.