-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⭐️ Added resource validations #114
Conversation
Signed-off-by: Paul <[email protected]>
Signed-off-by: Paul <[email protected]>
Signed-off-by: Paul <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Pauti
@@ -83,11 +89,23 @@ func (r *integrationAzureResource) Schema(ctx context.Context, req resource.Sche | |||
MarkdownDescription: "List of Azure subscriptions to scan.", | |||
Optional: true, | |||
ElementType: types.StringType, | |||
Validators: []validator.List{ | |||
// Validate only this attribute or other_attr is configured. | |||
listvalidator.ConflictsWith(path.Expressions{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice addition
@@ -62,6 +65,9 @@ func (r *policyAssignmentResource) Schema(ctx context.Context, req resource.Sche | |||
Default: stringdefault.StaticString("enabled"), | |||
Computed: true, | |||
Optional: true, | |||
Validators: []validator.String{ | |||
stringvalidator.OneOf("enabled", "disabled", "preview"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice addition
No description provided.