diff --git a/docs/resources/ignore_rule.md b/docs/resources/ignore_rule.md index 2cfe5bae..7bdc1c1d 100644 --- a/docs/resources/ignore_rule.md +++ b/docs/resources/ignore_rule.md @@ -68,7 +68,7 @@ resource "xray_ignore_rule" "ignore-111" { - `component` (Block Set) List of specific components to ignore. Omit to apply to all. (see [below for nested schema](#nestedblock--component)) - `cves` (Set of String) List of specific CVEs to ignore. Omit to apply to all. Should set to 'any' when 'vulnerabilities' is set to 'any'. - `docker_layers` (Set of String) List of Docker layer SHA256 hashes to ignore. Omit to apply to all. -- `expiration_date` (String) The Ignore Rule will be active until the expiration date. At that date it will automatically get deleted. The rule with the expiration date less than current day, will error out. +- `expiration_date` (String) The Ignore Rule will be active until the expiration date. At that date it will automatically get deleted. The rule with the expiration date less than current day, will error out. Ensure client and server time zones match. - `licenses` (Set of String) List of specific licenses to ignore. Omit to apply to all. - `operational_risk` (Set of String) Operational risk to ignore. Only accept 'any' - `policies` (Set of String) List of specific policies to ignore. Omit to apply to all. diff --git a/pkg/xray/resource/resource_xray_ignore_rule.go b/pkg/xray/resource/resource_xray_ignore_rule.go index b1dab5a5..7daa144c 100644 --- a/pkg/xray/resource/resource_xray_ignore_rule.go +++ b/pkg/xray/resource/resource_xray_ignore_rule.go @@ -114,7 +114,7 @@ func (m IgnoreRuleResourceModel) toAPIModel(ctx context.Context, apiModel *Ignor var expiresAt *time.Time if m.ExpiredAt.ValueString() != "" { - parsedTime, err := time.Parse("2006-01-02", m.ExpiredAt.ValueString()) + parsedTime, err := time.ParseInLocation("2006-01-02", m.ExpiredAt.ValueString(), time.Local) if err != nil { ds.AddError( "failed to parse date/time string",