diff --git a/apstra/validator/must_be_one_of.go b/apstra/validator/must_be_one_of.go index 02d22571..b86af63b 100644 --- a/apstra/validator/must_be_one_of.go +++ b/apstra/validator/must_be_one_of.go @@ -3,6 +3,7 @@ package apstravalidator import ( "context" "fmt" + "github.com/hashicorp/terraform-plugin-framework-validators/helpers/validatordiag" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/diag" @@ -38,7 +39,8 @@ func (o MustBeOneOfValidator) MarkdownDescription(_ context.Context) string { } func (o MustBeOneOfValidator) Validate(_ context.Context, req MustBeOneOfValidatorRequest, - resp *MustBeOneOfValidatorResponse) { + resp *MustBeOneOfValidatorResponse, +) { for _, v := range o.OneOf { if req.ConfigValue.Equal(v) { return diff --git a/apstra/validator/parse_speed.go b/apstra/validator/parse_speed.go index 5acef40f..8d0f3fb0 100644 --- a/apstra/validator/parse_speed.go +++ b/apstra/validator/parse_speed.go @@ -3,9 +3,10 @@ package apstravalidator import ( "context" "fmt" + "strings" + "github.com/hashicorp/terraform-plugin-framework-validators/helpers/validatordiag" "github.com/hashicorp/terraform-plugin-framework/schema/validator" - "strings" ) var _ validator.String = ParseSpeedValidator{} diff --git a/apstra/validator/rack_fcd_must_be.go b/apstra/validator/rack_fcd_must_be.go index bf53bc30..6d993468 100644 --- a/apstra/validator/rack_fcd_must_be.go +++ b/apstra/validator/rack_fcd_must_be.go @@ -3,6 +3,7 @@ package apstravalidator import ( "context" "fmt" + "github.com/Juniper/apstra-go-sdk/apstra" "github.com/hashicorp/terraform-plugin-framework-validators/helpers/validatordiag" "github.com/hashicorp/terraform-plugin-framework/attr" diff --git a/apstra/validator/rack_fcd_must_be_when_null.go b/apstra/validator/rack_fcd_must_be_when_null.go index 240dff43..58be775f 100644 --- a/apstra/validator/rack_fcd_must_be_when_null.go +++ b/apstra/validator/rack_fcd_must_be_when_null.go @@ -3,6 +3,7 @@ package apstravalidator import ( "context" "fmt" + "github.com/Juniper/apstra-go-sdk/apstra" "github.com/hashicorp/terraform-plugin-framework-validators/helpers/validatordiag" "github.com/hashicorp/terraform-plugin-framework/attr" diff --git a/apstra/validator/rack_fcd_must_be_when_value.go b/apstra/validator/rack_fcd_must_be_when_value.go index 385ce767..04748561 100644 --- a/apstra/validator/rack_fcd_must_be_when_value.go +++ b/apstra/validator/rack_fcd_must_be_when_value.go @@ -3,6 +3,7 @@ package apstravalidator import ( "context" "fmt" + "github.com/Juniper/apstra-go-sdk/apstra" "github.com/hashicorp/terraform-plugin-framework-validators/helpers/validatordiag" "github.com/hashicorp/terraform-plugin-framework/attr" @@ -13,9 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" ) -var ( - _ validator.String = RackFabricConnectivityDesignMustBeWhenValueValidator{} -) +var _ validator.String = RackFabricConnectivityDesignMustBeWhenValueValidator{} type RackFabricConnectivityDesignMustBeWhenValueValidator struct { fcd apstra.FabricConnectivityDesign diff --git a/apstra/validator/when_value_set.go b/apstra/validator/when_value_set.go index e93e0eb5..091486ca 100644 --- a/apstra/validator/when_value_set.go +++ b/apstra/validator/when_value_set.go @@ -3,9 +3,10 @@ package apstravalidator import ( "context" "fmt" + "strings" + "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/terraform-plugin-framework/schema/validator" - "strings" ) var _ NineTypesValidator = whenValueSetValidator{}