Add inventory_reporting_config to hcp_vault_cluster resource#1468
Open
Nexus357ZA wants to merge 7 commits intohashicorp:mainfrom
Open
Add inventory_reporting_config to hcp_vault_cluster resource#1468Nexus357ZA wants to merge 7 commits intohashicorp:mainfrom
Nexus357ZA wants to merge 7 commits intohashicorp:mainfrom
Conversation
This commit adds support for enabling and managing HCP Vault Dedicated inventory reporting through the hcp_vault_cluster resource. Changes: - Added inventory_reporting_config schema block with enabled boolean field - Implemented getInventoryReportingConfig() helper to extract config from state - Implemented flattenInventoryReportingConfig() helper to populate state from API - Updated UpdateVaultClusterConfig() to accept and handle reporting config - Added reporting config to create, update, and read operations - Updated HasChanges checks to include inventory_reporting_config The feature allows users to: - Enable inventory reporting on new clusters - Enable/disable reporting on existing clusters - Track reporting enrollment status in Terraform state API support confirmed in HCP SDK v0.166.0: - HashicorpCloudVault20201125InputReportingConfig (input) - HashicorpCloudVault20201125ReportingConfig (output) Related: Feature is currently in beta per HCP documentation Documentation: https://developer.hashicorp.com/hcp/docs/vault/reporting
- Added changelog entry for the new feature - Updated example to demonstrate inventory_reporting_config usage - Regenerated documentation using go generate - Docs now include inventory_reporting_config block description This completes the contributing requirements for the feature.
|
This PR is more than 2 weeks old. Please remove the stale label, update, or comment if this PR is still valid and relevant, otherwise it will be closed in 7 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for the HCP Vault Dedicated Inventory Reporting feature (currently in beta) to the
hcp_vault_clusterresource. This allows users to enable/disable inventory reporting for secrets and certificates visibility through Terraform.Related Documentation
Changes
Implementation
inventory_reporting_configblock tohcp_vault_clusterresource schemametrics_config,audit_log_config)UpdateVaultClusterConfig()ininternal/clients/vault_cluster.goto support the new parameterHashicorpCloudVault20201125InputReportingConfigandHashicorpCloudVault20201125ReportingConfig)Documentation
examples/resources/hcp_vault_cluster/resource.tfgo generateSchema
The
enabledattribute defaults tofalseand controls whether Vault reports secret and certificate inventory data to HCP.Testing
Code compiles successfully. Manual testing would require:
Notes
placeholder.txtand will be renamed to match the PR number once assignedChecklist
go fmt