@@ -339,9 +339,10 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
339339 Description : "If true, the rule will fail if the pattern matches." ,
340340 },
341341 "operator" : {
342- Type : schema .TypeString ,
343- Required : true ,
344- Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
342+ Type : schema .TypeString ,
343+ ValidateDiagFunc : operatorValidation ,
344+ Required : true ,
345+ Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
345346 },
346347 "pattern" : {
347348 Type : schema .TypeString ,
@@ -369,9 +370,10 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
369370 Description : "If true, the rule will fail if the pattern matches." ,
370371 },
371372 "operator" : {
372- Type : schema .TypeString ,
373- Required : true ,
374- Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
373+ Type : schema .TypeString ,
374+ ValidateDiagFunc : operatorValidation ,
375+ Required : true ,
376+ Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
375377 },
376378 "pattern" : {
377379 Type : schema .TypeString ,
@@ -399,9 +401,10 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
399401 Description : "If true, the rule will fail if the pattern matches." ,
400402 },
401403 "operator" : {
402- Type : schema .TypeString ,
403- Required : true ,
404- Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
404+ Type : schema .TypeString ,
405+ ValidateDiagFunc : operatorValidation ,
406+ Required : true ,
407+ Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
405408 },
406409 "pattern" : {
407410 Type : schema .TypeString ,
@@ -430,9 +433,10 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
430433 Description : "If true, the rule will fail if the pattern matches." ,
431434 },
432435 "operator" : {
433- Type : schema .TypeString ,
434- Required : true ,
435- Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
436+ Type : schema .TypeString ,
437+ ValidateDiagFunc : operatorValidation ,
438+ Required : true ,
439+ Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
436440 },
437441 "pattern" : {
438442 Type : schema .TypeString ,
@@ -461,9 +465,10 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
461465 Description : "If true, the rule will fail if the pattern matches." ,
462466 },
463467 "operator" : {
464- Type : schema .TypeString ,
465- Required : true ,
466- Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
468+ Type : schema .TypeString ,
469+ ValidateDiagFunc : operatorValidation ,
470+ Required : true ,
471+ Description : "The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`." ,
467472 },
468473 "pattern" : {
469474 Type : schema .TypeString ,
0 commit comments