uptime check period cannot be updated (#2781)

<!-- This change is generated by MagicModules. -->
/cc @chrisst

fixes #2703
This commit is contained in:
The Magician 2019-01-02 12:44:33 -08:00 committed by Chris Stephens
parent 0208dbcb05
commit 74013c7dc6

View File

@ -168,6 +168,7 @@ func resourceMonitoringUptimeCheckConfig() *schema.Resource {
"period": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Default: "300s",
},
"resource_group": {
@ -399,12 +400,6 @@ func resourceMonitoringUptimeCheckConfigUpdate(d *schema.ResourceData, meta inte
} else if v, ok := d.GetOkExists("display_name"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, displayNameProp)) {
obj["displayName"] = displayNameProp
}
periodProp, err := expandMonitoringUptimeCheckConfigPeriod(d.Get("period"), d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("period"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, periodProp)) {
obj["period"] = periodProp
}
timeoutProp, err := expandMonitoringUptimeCheckConfigTimeout(d.Get("timeout"), d, config)
if err != nil {
return err