[SECURITY] Resource and Datasource Implementation for EntrustnShield HSM group#404
[SECURITY] Resource and Datasource Implementation for EntrustnShield HSM group#404Tejashree-RS wants to merge 11 commits into
Conversation
…nios into hsm_entrustnshield
…nios into hsm_entrustnshield
There was a problem hiding this comment.
Pull request overview
This PR adds a new Terraform resource and data source for managing Entrust nShield HSM groups under the security service package. It includes the model, resource CRUD operations, data source with paging support, validation logic, tests, docs, and examples.
Changes:
- New resource
nios_security_hsm_entrustnshieldgroupwith CRUD, import, and config validation (SOFTCARD requires card_name + pass_phrase) - New data source
nios_security_hsm_entrustnshieldgroupwith filtering and pagination - Comprehensive acceptance tests covering individual attributes
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| model_hsm_entrustnshieldgroup.go | Model, schema, expand/flatten for the HSM group resource |
| model_hsm_entrustnshieldgroup_entrustnshield_hsm.go | Nested HSM device model, schema, expand/flatten |
| hsm_entrustnshieldgroup_resource.go | Resource CRUD, import, and ValidateConfig |
| hsm_entrustnshieldgroup_data_source.go | Data source with paging support |
| hsm_entrustnshieldgroup_resource_test.go | Acceptance tests for the resource |
| hsm_entrustnshieldgroup_data_source_test.go | Acceptance tests for the data source |
| internal/provider/provider.go | Register new resource and data source |
| examples/ | Example TF configs for resource and data source |
| docs/ | Generated documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "remote_port": schema.Int64Attribute{ | ||
| Optional: true, | ||
| Computed: true, | ||
| Default: int64default.StaticInt64(9004), | ||
| MarkdownDescription: "The Entrust nShield HSM device destination port.", | ||
| }, |
There was a problem hiding this comment.
The remote_port attribute lacks port range validation. The parent-level key_server_port uses int64validator.Between(0, 65535) (line 89 of model_hsm_entrustnshieldgroup.go). The same validation should be applied here for consistency and correctness.
No description provided.