-
Notifications
You must be signed in to change notification settings - Fork 47
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
VAULT-31135: add new hcp_vault_radar_source_github_cloud resource. #1119
Conversation
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 implementation for most part was taken from the previous implementation of resource_radar_source_github_enterprise
but refactored out a few things to be shared with resource_radar_source_github_cloud
.
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.
Most of the red in this file moved to the abstraction in radar_source
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!
) | ||
|
||
// radarSourceResource is an implementation for configuring specific types Radar data sources. | ||
// Examples: hcp_vault_radar_source_github_cloud and hcp__vault_radar_source_github_enterprise make use of |
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.
nit: Should be one underscore instead of the two hcp__vault_radar_source_github_enterprise
?
@@ -0,0 +1,3 @@ | |||
```release-note:feature |
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.
Curious where 1119
comes from, I see 1116
from your last PR but don't see 1117
or 1118
on main, are they from other PRs?
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.
1119 the PR number
🛠️ Description
Preview of managing a Vault Radar GitHub Cloud via the HCP Terraform Provider.
This introduces a new
hcp_vault_radar_source_github_cloud
resource.This is similar to
hcp_vault_radar_source_github_enterprise
which already existed. I refactored out the commonality that manages Radar source TF resources. Both the newhcp_vault_radar_source_github_cloud
and the existinghcp_vault_radar_source_github_enterprise
share the same resource implementation, but still provide different schemas, validation, and resource names. This abstraction will allow use to introduce support for managing other radar source like GitLab and Bitbucket later on.Note
This is a preview, and my intent is for this resource not to show up in the in the online documentations.
Therefore, I did not set the subcategory in the markup.
New Resource Checklist
go fmt
.Schema
CRUD Operations
Documentation
🏗️ Acceptance tests
Note
These acceptance tests works, but requires external environments not avail to CI/CD.
These tests are being skipped because of pre-existing conditions that would be require for the test to succeed.
Note
A ticket exist to address this in the future.
https://hashicorp.atlassian.net/browse/VAULT-31712
Output from acceptance testing:
make testacc TESTARGS='-run=TestRadarSourceGitHubCloud' ... === RUN TestRadarSourceGitHubCloud --- PASS: TestRadarSourceGitHubCloud (26.90s) ...