Skip to content

Commit

Permalink
Merge pull request #12664 from njuCZ/adf_custom_ls_fix
Browse files Browse the repository at this point in the history
"azurerm_data_factory_linked_custom_service" - fix bug for "additional_properties"
  • Loading branch information
manicminer authored Jul 20, 2021
2 parents fd1a6aa + 9d7d498 commit 4464fc5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,14 @@ func resourceDataFactoryLinkedCustomServiceRead(d *pluginsdk.ResourceData, meta

delete(m, "typeProperties")

// set "additional_properties"
additionalProperties := make(map[string]interface{})
for k, v := range m {
additionalProperties[k] = v
bytes, err := json.Marshal(m)
if err != nil {
return err
}
if err := json.Unmarshal(bytes, &additionalProperties); err != nil {
return err
}
d.Set("additional_properties", additionalProperties)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,21 @@ JSON
}
}
parameters = {
"foo" : "bar"
"Env" : "Test"
additional_properties = {
foo = "test1"
bar = "test2"
}
annotations = [
"test1",
"test2",
"test3"
]
parameters = {
"foo" : "bar"
"Env" : "Test"
}
}
`, r.template(data), data.RandomInteger)
}
Expand Down

0 comments on commit 4464fc5

Please sign in to comment.