@@ -8,12 +8,15 @@ import (
88 "fmt"
99
1010 "terraform-provider-tlspc/internal/tlspc"
11+ "terraform-provider-tlspc/internal/validators"
1112
13+ "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
1214 "github.com/hashicorp/terraform-plugin-framework/path"
1315 "github.com/hashicorp/terraform-plugin-framework/resource"
1416 "github.com/hashicorp/terraform-plugin-framework/resource/schema"
1517 "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
1618 "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
19+ "github.com/hashicorp/terraform-plugin-framework/schema/validator"
1720 "github.com/hashicorp/terraform-plugin-framework/types"
1821)
1922
@@ -52,16 +55,25 @@ func (r *fireflyConfigResource) Schema(_ context.Context, _ resource.SchemaReque
5255 "subca_provider" : schema.StringAttribute {
5356 Required : true ,
5457 MarkdownDescription : "The ID of the Firefly SubCA Provider" ,
58+ Validators : []validator.String {
59+ validators .Uuid (),
60+ },
5561 },
5662 "service_accounts" : schema.SetAttribute {
5763 Required : true ,
5864 ElementType : types .StringType ,
5965 MarkdownDescription : "A list of service account IDs" ,
66+ Validators : []validator.Set {
67+ setvalidator .ValueStringsAre (validators .Uuid ()),
68+ },
6069 },
6170 "policies" : schema.SetAttribute {
6271 Required : true ,
6372 ElementType : types .StringType ,
6473 MarkdownDescription : "A list of Firefly Issuance Policy IDs" ,
74+ Validators : []validator.Set {
75+ setvalidator .ValueStringsAre (validators .Uuid ()),
76+ },
6577 },
6678 },
6779 }
0 commit comments