diff --git a/zia/resource_zia_dlp_web_rules.go b/zia/resource_zia_dlp_web_rules.go index 5e27d498..1b22b979 100644 --- a/zia/resource_zia_dlp_web_rules.go +++ b/zia/resource_zia_dlp_web_rules.go @@ -200,7 +200,6 @@ func resourceDlpWebRules() *schema.Resource { "zscaler_incident_receiver": { Type: schema.TypeBool, Optional: true, - Default: true, Description: "Indicates whether a Zscaler Incident Receiver is associated to the DLP policy rule.", }, "locations": setIDsSchemaTypeCustom(intPtr(8), "The Name-ID pairs of locations to which the DLP policy rule must be applied."), diff --git a/zia/resource_zia_location_management.go b/zia/resource_zia_location_management.go index d7a55c8c..92b9ab45 100644 --- a/zia/resource_zia_location_management.go +++ b/zia/resource_zia_location_management.go @@ -218,7 +218,6 @@ func resourceLocationManagement() *schema.Resource { "display_time_unit": { Type: schema.TypeString, Optional: true, - Default: "MINUTE", Description: "Display Time Unit. The time unit to display for IP Surrogate idle time to disassociation.", ValidateFunc: validation.StringInSlice([]string{ "MINUTE", diff --git a/zia/resource_zia_url_filtering_rules.go b/zia/resource_zia_url_filtering_rules.go index abc307ba..d95e548b 100644 --- a/zia/resource_zia_url_filtering_rules.go +++ b/zia/resource_zia_url_filtering_rules.go @@ -217,16 +217,14 @@ func resourceURLFilteringRules() *schema.Resource { Description: "Enforce a set a validity time period for the URL Filtering rule.", }, "validity_start_time": { - Type: schema.TypeString, - Optional: true, - Description: "If enforceTimeValidity is set to true, the URL Filtering rule is valid starting on this date and time.", - ValidateFunc: validateTimesNotInPast, + Type: schema.TypeString, + Optional: true, + Description: "If enforceTimeValidity is set to true, the URL Filtering rule is valid starting on this date and time.", }, "validity_end_time": { - Type: schema.TypeString, - Optional: true, - Description: "If enforceTimeValidity is set to true, the URL Filtering rule ceases to be valid on this end date and time.", - ValidateFunc: validateTimesNotInPast, + Type: schema.TypeString, + Optional: true, + Description: "If enforceTimeValidity is set to true, the URL Filtering rule ceases to be valid on this end date and time.", }, "validity_time_zone_id": { Type: schema.TypeString, @@ -764,23 +762,6 @@ func ConvertRFC1123ToEpoch(timeStr string) (int, error) { return int(t.Unix()), nil } -func validateTimesNotInPast(val interface{}, key string) (warns []string, errs []error) { - timeStr := val.(string) - timeVal, err := ConvertRFC1123ToEpoch(timeStr) - if err != nil { - errs = append(errs, fmt.Errorf("%q: invalid time format: %v. Expected format: RFC1123 (Mon, 02 Jan 2006 15:04:05 MST)", key, err)) - return - } - - now := time.Now().Unix() - - if int64(timeVal) < now { - errs = append(errs, fmt.Errorf("%q: time cannot be in the past", key)) - } - - return -} - func convertAndValidateSizeQuota(sizeQuotaMB int) (int, error) { const ( minMB = 10