-
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
Standardize error handling and refactor old resources #521
Conversation
454d998
to
bd6f07e
Compare
bd6f07e
to
ab89d44
Compare
@VictorGFM , please start reviewing when you have a chance. I will not perform more structural changes and I don't think I will refactor more resources as I was targeting those that are heavily used. I will post the result of my tests later, but so far everything runs perfectly. |
@jrich523 , the code analysis is failing for some test IPs we add to the code. Please lmk how to ignore this check for those cases (if possible) to get a clean run. |
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.
Changes look good, thanks for working on this! I just have some minor comments below, please consider addressing them before merging the PR
Quality Gate passedIssues Measures |
Description of the change
core
abstractions and improve error handling to avoid the state from getting out of sync when a resource is removed from the control plane:cyral_datalabel
cyral_repository
cyral_repository_access_gateway
cyral_repository_access_rules
cyral_repository_binding
cyral_repository_conf_analysis
cyral_repository_conf_auth
cyral_repository_network_access_policy
cyral_sidecar
cyral_sidecar_credentials
cyral_sidecar_listener
core
package to reuse the code for resources not found and also add new features to handle different errors based on the API description (the later due to some of our APIs not returning proper status codes).Type of change
Checklists
Development
Code review
Testing
Acceptance tests output:
In order to verify the changes in each resource, I performed manual tests for each one of them in the .tf file that follows. The procedure was:
terraform apply
to create all resources;terraform apply
again and make sure it will suggest the creation of the resource again. The command must run without errors.terraform destroy -target=<resource-reference>
and make sure Terraform will inform that the resource may already been removed. The command must run without errors.terraform destroy
and start again from1
with another resource.