diff --git a/adguard/client_resource.go b/adguard/client_resource.go index 0fc9f89..e1b0de7 100644 --- a/adguard/client_resource.go +++ b/adguard/client_resource.go @@ -11,11 +11,11 @@ import ( "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/terraform-community-providers/terraform-plugin-framework-utils/modifiers" ) // ensure the implementation satisfies the expected interfaces @@ -96,49 +96,37 @@ func (r *clientResource) Schema(_ context.Context, _ resource.SchemaRequest, res Description: "Whether to use global settings on this client", Computed: true, Optional: true, - PlanModifiers: []planmodifier.Bool{ - modifiers.DefaultBool(true), - }, + Default: booldefault.StaticBool(true), }, "filtering_enabled": schema.BoolAttribute{ Description: "Whether to have filtering enabled on this client", Computed: true, Optional: true, - PlanModifiers: []planmodifier.Bool{ - modifiers.DefaultBool(false), - }, + Default: booldefault.StaticBool(false), }, "parental_enabled": schema.BoolAttribute{ Description: "Whether to have AdGuard parental controls enabled on this client", Computed: true, Optional: true, - PlanModifiers: []planmodifier.Bool{ - modifiers.DefaultBool(false), - }, + Default: booldefault.StaticBool(false), }, "safebrowsing_enabled": schema.BoolAttribute{ Description: "Whether to have AdGuard browsing security enabled on this client", Computed: true, Optional: true, - PlanModifiers: []planmodifier.Bool{ - modifiers.DefaultBool(false), - }, + Default: booldefault.StaticBool(false), }, "safesearch_enabled": schema.BoolAttribute{ Description: "Whether to enforce safe search on this client", Computed: true, Optional: true, - PlanModifiers: []planmodifier.Bool{ - modifiers.DefaultBool(false), - }, + Default: booldefault.StaticBool(false), }, "use_global_blocked_services": schema.BoolAttribute{ Description: "Whether to use global settings for blocked services", Computed: true, Optional: true, - PlanModifiers: []planmodifier.Bool{ - modifiers.DefaultBool(true), - }, + Default: booldefault.StaticBool(true), }, "blocked_services": schema.ListAttribute{ Description: "List of blocked services for this client", diff --git a/go.mod b/go.mod index f5fa91f..cf1b1d2 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( github.com/hashicorp/terraform-plugin-go v0.14.3 github.com/hashicorp/terraform-plugin-log v0.8.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 - github.com/terraform-community-providers/terraform-plugin-framework-utils v0.3.0 ) require ( diff --git a/go.sum b/go.sum index efe7874..e33b901 100644 --- a/go.sum +++ b/go.sum @@ -38,8 +38,6 @@ github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBD github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/gmichels/adguard-client-go v0.2.0 h1:uozTy5NCQj3gt1/ifaeIs58PIOzHcHqAFxX/04BRxgA= -github.com/gmichels/adguard-client-go v0.2.0/go.mod h1:77E8dDI1mhRP5E7tNJWvtF2PLqZiqwcmMrgBUCCc4KY= github.com/gmichels/adguard-client-go v0.2.1 h1:N+SArVllJixvN1jA2zSp+vsrtmZVmAQymY5q0dzhsMU= github.com/gmichels/adguard-client-go v0.2.1/go.mod h1:77E8dDI1mhRP5E7tNJWvtF2PLqZiqwcmMrgBUCCc4KY= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= @@ -199,8 +197,6 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/terraform-community-providers/terraform-plugin-framework-utils v0.3.0 h1:9p3a6Y9H/RiBpeY+V28R3nSPLAOG8z4lP17QyunXMfE= -github.com/terraform-community-providers/terraform-plugin-framework-utils v0.3.0/go.mod h1:qxBCEJqhF0NPLX+FrRYALlpxXSi1nhTx/x1aimUEqRY= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=