Skip to content

Commit a7b748f

Browse files
Merge pull request #5905 from zakcutner/ruleset/rules-attributes
test(cloudflare_ruleset): add coverage for `rules` attributes
2 parents 2b469f8 + 87bda5d commit a7b748f

File tree

13 files changed

+579
-2
lines changed

13 files changed

+579
-2
lines changed

internal/services/ruleset/model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ type RulesetRulesRatelimitModel struct {
309309
Characteristics customfield.List[types.String] `tfsdk:"characteristics" json:"characteristics,required"`
310310
Period types.Int64 `tfsdk:"period" json:"period,required"`
311311
CountingExpression types.String `tfsdk:"counting_expression" json:"counting_expression,optional"`
312-
MitigationTimeout types.Int64 `tfsdk:"mitigation_timeout" json:"mitigation_timeout,optional"`
312+
MitigationTimeout types.Int64 `tfsdk:"mitigation_timeout" json:"mitigation_timeout,computed_optional"`
313313
RequestsPerPeriod types.Int64 `tfsdk:"requests_per_period" json:"requests_per_period,optional"`
314-
RequestsToOrigin types.Bool `tfsdk:"requests_to_origin" json:"requests_to_origin,optional"`
314+
RequestsToOrigin types.Bool `tfsdk:"requests_to_origin" json:"requests_to_origin,computed_optional,decode_null_to_zero"`
315315
ScorePerPeriod types.Int64 `tfsdk:"score_per_period" json:"score_per_period,optional"`
316316
ScoreResponseHeaderName types.String `tfsdk:"score_response_header_name" json:"score_response_header_name,optional"`
317317
}

0 commit comments

Comments
 (0)