Skip to content

Commit

Permalink
azurerm_storage_data_lake_gen2_[filesystem|path] - change the ace p…
Browse files Browse the repository at this point in the history
…roperty to a TypeSet to ensure consistent ordering (#10372)

Convert TypeList to TypeSet since SDK/API's order is non-deterministic
  • Loading branch information
favoretti authored Feb 1, 2021
1 parent 55516d6 commit 3fbcd61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func resourceStorageDataLakeGen2FileSystem() *schema.Resource {
"properties": MetaDataSchema(),

"ace": {
Type: schema.TypeList,
Type: schema.TypeSet,
Optional: true,
Computed: true,
Elem: &schema.Resource{
Expand Down Expand Up @@ -123,7 +123,7 @@ func resourceStorageDataLakeGen2FileSystemCreate(d *schema.ResourceData, meta in
return err
}

aceRaw := d.Get("ace").([]interface{})
aceRaw := d.Get("ace").(*schema.Set).List()
acl, err := ExpandDataLakeGen2AceList(aceRaw)
if err != nil {
return fmt.Errorf("Error parsing ace list: %s", err)
Expand Down Expand Up @@ -200,7 +200,7 @@ func resourceStorageDataLakeGen2FileSystemUpdate(d *schema.ResourceData, meta in
return err
}

aceRaw := d.Get("ace").([]interface{})
aceRaw := d.Get("ace").(*schema.Set).List()
acl, err := ExpandDataLakeGen2AceList(aceRaw)
if err != nil {
return fmt.Errorf("Error parsing ace list: %s", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func resourceStorageDataLakeGen2Path() *schema.Resource {
},

"ace": {
Type: schema.TypeList,
Type: schema.TypeSet,
Optional: true,
Computed: true,
Elem: &schema.Resource{
Expand Down Expand Up @@ -183,7 +183,7 @@ func resourceStorageDataLakeGen2PathCreate(d *schema.ResourceData, meta interfac
default:
return fmt.Errorf("Unhandled resource type %q", resourceString)
}
aceRaw := d.Get("ace").([]interface{})
aceRaw := d.Get("ace").(*schema.Set).List()
acl, err := ExpandDataLakeGen2AceList(aceRaw)
if err != nil {
return fmt.Errorf("Error parsing ace list: %s", err)
Expand Down Expand Up @@ -247,7 +247,7 @@ func resourceStorageDataLakeGen2PathUpdate(d *schema.ResourceData, meta interfac

path := d.Get("path").(string)

aceRaw := d.Get("ace").([]interface{})
aceRaw := d.Get("ace").(*schema.Set).List()
acl, err := ExpandDataLakeGen2AceList(aceRaw)
if err != nil {
return fmt.Errorf("Error parsing ace list: %s", err)
Expand Down

0 comments on commit 3fbcd61

Please sign in to comment.