-
Notifications
You must be signed in to change notification settings - Fork 50
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-29412: Preview of new Vault Radar resource. #1092
Conversation
Manage a Vault Radar source of type GitHub Enterprise via the HCP Terraform Provider.
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
token := os.Getenv("RADAR_GITHUB_ENTERPRISE_TOKEN") | ||
|
||
if projectID == "" || githubOrganization == "" || domainName == "" || token == "" { | ||
t.Skip("HCP_PROJECT_ID, RADAR_GITHUB_ENTERPRISE_ORGANIZATION, RADAR_GITHUB_ENTERPRISE_DOMAIN, and RADAR_GITHUB_ENTERPRISE_TOKEN must be set for acceptance tests") |
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.
@jasonpilz Seems the automated testing is on, and this will fail for CI.
- Requires Project already setup with Radar.
- Requires a Service Account with an Admin role on the Project.
- Requires access to a GitHub Enterprise self-managed instance.
This is a best effort test, and works on my local setup with the proper env setup.
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.
I created the following ticket to try an address this in the future.
https://hashicorp.atlassian.net/browse/VAULT-31051
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.
Sounds good, thanks 👍🏻
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.
Can't say I understand much of the TF stuff but the Radar stuff looks good to me!
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.
Looks good, have few some questions and suggestions
internal/provider/vaultradar/resource_radar_source_github_enterprise.go
Outdated
Show resolved
Hide resolved
internal/provider/vaultradar/resource_radar_source_github_enterprise.go
Outdated
Show resolved
Hide resolved
internal/provider/vaultradar/resource_radar_source_github_enterprise.go
Outdated
Show resolved
Hide resolved
internal/provider/vaultradar/resource_radar_source_github_enterprise.go
Outdated
Show resolved
Hide resolved
Update resource desc, fix context, better regex for validating domain name.
When the resource has been marked, but not fully deleted we need to handle this case differently for Get and Delete.
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!
Preview of Manage a Vault Radar source of type GitHub Enterprise via the HCP Terraform Provider.
Important
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
🛠️ Description
Manage a Vault Radar source of type GitHub Enterprise via the HCP Terraform Provider.
🏗️ Acceptance tests
Warning
This AC test is being skipped because of pre-existing conditions that would be require for the test to succeed.
Note
I've created a ticket to note how we can address this sometime in the future.
https://hashicorp.atlassian.net/browse/VAULT-31051
Output from acceptance testing: