-
Notifications
You must be signed in to change notification settings - Fork 3
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
ENG-14612: Implement cyral_policy_wizards resource #593
Conversation
0cd5b5b
to
8b7940f
Compare
a199532
to
2e8c25a
Compare
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.
A few suggestions:
- If the api is
policyWizard
in the singular, please use the same convention for the resource. I remember mentioning it should be in plural, but it was a mistake on my end as I did not check if the API was plural as well. - As for code hygiene, I suggest to keep the
policy_wizard
in its own package. Seems like the package structure should be:
- policy
|- set
|- wizard
Well the REST path is Also given that the data source returns a list of wizards, I'd suggest retaining the plural. |
@@ -180,8 +180,6 @@ func getCredentials(d *schema.ResourceData) (string, string, diag.Diagnostics) { | |||
return clientID, clientSecret, diags | |||
} | |||
|
|||
var provider = Provider() |
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.
This is an unused private variable that causes a linter warning.
Thanks for the suggestion, this is incorporated in the latest commit. |
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.
LGTM
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.
The convention documented here used throughout the whole codebase makes it faster to anyone reading it to understand what is going on. Maybe the docs are not good enough to ask to follow the same naming conventions, but if you check all the other resources they will look the very same as the changes I propose in the review.
As we use clear and descriptive package names like policy.set
and policy.wizard
, we can use the same standards to make it easier to anyone used to read any of our resources and data sources. We also end up avoid Smurf naming convention.
Yeah, this happened due to refactoring out into separate packages for policy set and wizard - I had to use different names when they were in the same package. Will fix. |
Quality Gate passedIssues Measures |
Description of the change
As title
Type of change
Checklists
Development
Code review
Testing