Skip to content

Commit

Permalink
updated so os_type is always set
Browse files Browse the repository at this point in the history
  • Loading branch information
jackofallops committed Feb 21, 2020
1 parent f08b980 commit bba05e3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions azurerm/internal/services/web/resource_arm_function_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,11 @@ func resourceArmFunctionAppRead(d *schema.ResourceData, meta interface{}) error
d.Set("name", name)
d.Set("resource_group_name", resGroup)
d.Set("kind", resp.Kind)

if notWindows := strings.HasPrefix(*resp.Kind, "functionapp,linux"); notWindows {
d.Set("os_type", utils.String("linux"))
osType := ""
if v := resp.Kind; v != nil && strings.Contains(*v, "linux") {
osType = "linux"
}
d.Set("os_type", osType)

if location := resp.Location; location != nil {
d.Set("location", azure.NormalizeLocation(*location))
Expand Down

0 comments on commit bba05e3

Please sign in to comment.