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

New resource: wiz_project_cloud_account_link #215

Merged

Conversation

NerdJeremia
Copy link
Contributor

Add a separate resource to manage link of a project to a cloud account without using the embedded set in the wiz_project resource.

resolves #214

@NerdJeremia NerdJeremia requested a review from a team as a code owner July 25, 2024 13:44
@jschoombee
Copy link
Collaborator

Hey @NerdJeremia - Thanks for the contribution. If you would add acc tests and update the PR? Link to contributing guide here

@NerdJeremia
Copy link
Contributor Author

Output of acceptance test:

➜  terraform-provider-wiz git:(feature/project-cloud-account-link) ✗ TF_ACC=1 go test ./internal/acceptance/... -v -run='TestAccResourceWizProjectCloudAccountLink_basic'                                                                                                                          
=== RUN   TestAccResourceWizProjectCloudAccountLink_basic
2024/07/26 10:23:20 [DEBUG] POST https://auth.app.wiz.io/oauth/token
2024/07/26 10:23:21 [DEBUG] POST https://auth.app.wiz.io/oauth/token
2024/07/26 10:23:21 [DEBUG] POST https://api.eu7.app.wiz.io/graphql
2024/07/26 10:23:21 [DEBUG] POST https://api.eu7.app.wiz.io/graphql
2024/07/26 10:23:21 [DEBUG] POST https://api.eu7.app.wiz.io/graphql
2024/07/26 10:23:22 [DEBUG] POST https://auth.app.wiz.io/oauth/token
2024/07/26 10:23:22 [DEBUG] POST https://api.eu7.app.wiz.io/graphql
2024/07/26 10:23:22 [DEBUG] POST https://auth.app.wiz.io/oauth/token
2024/07/26 10:23:22 [DEBUG] POST https://api.eu7.app.wiz.io/graphql
2024/07/26 10:23:23 [DEBUG] POST https://api.eu7.app.wiz.io/graphql
2024/07/26 10:23:23 [DEBUG] POST https://auth.app.wiz.io/oauth/token
2024/07/26 10:23:23 [DEBUG] POST https://auth.app.wiz.io/oauth/token
2024/07/26 10:23:23 [DEBUG] POST https://api.eu7.app.wiz.io/graphql
2024/07/26 10:23:23 [DEBUG] POST https://api.eu7.app.wiz.io/graphql
--- PASS: TestAccResourceWizProjectCloudAccountLink_basic (3.41s)
PASS
ok      wiz.io/hashicorp/terraform-provider-wiz/internal/acceptance     3.733s

@NerdJeremia
Copy link
Contributor Author

Hi @jschoombee,
the PR is ready so if you have time for a review that would be great!
Thanks!

@jschoombee
Copy link
Collaborator

jschoombee commented Aug 5, 2024

Hi @jschoombee, the PR is ready so if you have time for a review that would be great! Thanks!

Looking good, think its ready for merge. One request please is to rename internal/acceptance/resource_wiz_project_cloud_account_link_test.go to match naming conventions of existing acc tests (wiz can be removed). Also ran acceptance tests and behaviour is as expected, good job!

Once rebased with changes we can get this merged, will try find some time then to get to your 2nd PR

@NerdJeremia
Copy link
Contributor Author

Hi @jschoombee, the PR is ready so if you have time for a review that would be great! Thanks!

Looking good, think its ready for merge. One request please is to rename internal/acceptance/resource_wiz_project_cloud_account_link_test.go to match naming conventions of existing acc tests (wiz can be removed). Also ran acceptance tests and behaviour is as expected, good job!

Once rebased with changes we can get this merged, will try find some time then to get to your 2nd PR

Hi, thank you for the review. It should be ready to merge now.

@jschoombee jschoombee merged commit c2e8ff8 into AxtonGrams:main Aug 6, 2024
6 of 7 checks passed
@NerdJeremia NerdJeremia deleted the feature/project-cloud-account-link branch August 6, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wiz project cloud account link as separate resource
2 participants