Skip to content
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

Merged
merged 3 commits into from
Jun 27, 2024
Merged

Conversation

Pauti
Copy link
Contributor

@Pauti Pauti commented Jun 21, 2024

No description provided.

@Pauti Pauti changed the title fix: added space validations Added some validations Jun 26, 2024
@Pauti Pauti marked this pull request as ready for review June 26, 2024 13:35
Copy link
Member

@chris-rock chris-rock left a 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{
Copy link
Member

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"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice addition

@chris-rock chris-rock changed the title Added some validations Added resource validations Jun 27, 2024
@chris-rock chris-rock changed the title Added resource validations ⭐️ Added resource validations Jun 27, 2024
@chris-rock chris-rock merged commit abb7a22 into mondoohq:main Jun 27, 2024
8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants