Skip to content

Commit e2d28ab

Browse files
committed
Use customfield package within cloudflare_ruleset resource
1 parent b845463 commit e2d28ab

File tree

4 files changed

+168
-122
lines changed

4 files changed

+168
-122
lines changed

internal/services/ruleset/data_source_model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ type RulesetDataSourceModel struct {
2121
RulesetID types.String `tfsdk:"ruleset_id" path:"ruleset_id,optional"`
2222
AccountID types.String `tfsdk:"account_id" path:"account_id,optional"`
2323
ZoneID types.String `tfsdk:"zone_id" path:"zone_id,optional"`
24-
Description types.String `tfsdk:"description" json:"description,computed"`
2524
Kind types.String `tfsdk:"kind" json:"kind,computed"`
2625
Name types.String `tfsdk:"name" json:"name,computed"`
2726
Phase types.String `tfsdk:"phase" json:"phase,computed"`
27+
Description types.String `tfsdk:"description" json:"description,computed"`
2828
Rules customfield.NestedObjectList[RulesetRulesDataSourceModel] `tfsdk:"rules" json:"rules,computed"`
2929
}
3030

internal/services/ruleset/data_source_schema.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
4040
Description: "The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.",
4141
Optional: true,
4242
},
43-
"description": schema.StringAttribute{
44-
Description: "An informative description of the ruleset.",
45-
Computed: true,
46-
},
4743
"kind": schema.StringAttribute{
4844
Description: "The kind of the ruleset.\nAvailable values: \"managed\", \"custom\", \"root\", \"zone\".",
4945
Computed: true,
@@ -91,6 +87,10 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
9187
),
9288
},
9389
},
90+
"description": schema.StringAttribute{
91+
Description: "An informative description of the ruleset.",
92+
Computed: true,
93+
},
9494
"rules": schema.ListNestedAttribute{
9595
Description: "The list of rules in the ruleset.",
9696
Computed: true,

0 commit comments

Comments
 (0)