diff --git a/builtin/providers/azurerm/resource_arm_virtual_machine.go b/builtin/providers/azurerm/resource_arm_virtual_machine.go index 456d9bff6..95698b009 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_machine.go +++ b/builtin/providers/azurerm/resource_arm_virtual_machine.go @@ -730,7 +730,10 @@ func flattenAzureRmVirtualMachineOsProfileWindowsConfiguration(config *compute.W c["pass"] = i.PassName c["component"] = i.ComponentName c["setting_name"] = i.SettingName - c["content"] = *i.Content + + if i.Content != nil { + c["content"] = *i.Content + } content = append(content, c) }