Skip to content

[SECURITY] Resource and Datasource Implementation for EntrustnShield HSM group#404

Open
Tejashree-RS wants to merge 11 commits into
infobloxopen:featurefrom
Tejashree-RS:hsm_entrustnshield
Open

[SECURITY] Resource and Datasource Implementation for EntrustnShield HSM group#404
Tejashree-RS wants to merge 11 commits into
infobloxopen:featurefrom
Tejashree-RS:hsm_entrustnshield

Conversation

@Tejashree-RS

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread docs/data-sources/security_hsm_entrustnshieldgroup.md Outdated
Comment thread docs/resources/security_hsm_entrustnshieldgroup.md Outdated
Comment thread internal/service/security/hsm_entrustnshieldgroup_resource.go Outdated
Comment thread internal/service/security/hsm_entrustnshieldgroup_resource_test.go
Comment thread internal/service/security/hsm_entrustnshieldgroup_resource_test.go Outdated
Comment thread internal/service/security/hsm_entrustnshieldgroup_resource_test.go Outdated
Comment thread internal/service/security/hsm_entrustnshieldgroup_resource_test.go Outdated
Comment thread internal/service/security/model_hsm_entrustnshieldgroup.go
@Tejashree-RS Tejashree-RS requested a review from unasra March 11, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_entrustnshieldgroup with CRUD, import, and config validation (SOFTCARD requires card_name + pass_phrase)
  • New data source nios_security_hsm_entrustnshieldgroup with 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.

Comment thread internal/service/security/model_hsm_entrustnshieldgroup.go
Comment on lines +45 to +50
"remote_port": schema.Int64Attribute{
Optional: true,
Computed: true,
Default: int64default.StaticInt64(9004),
MarkdownDescription: "The Entrust nShield HSM device destination port.",
},

Copilot AI Mar 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread internal/service/security/hsm_entrustnshieldgroup_resource_test.go Outdated
Comment thread internal/service/security/hsm_entrustnshieldgroup_resource_test.go Outdated
@unasra unasra added the do not merge Fixes are required. Do not merge. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Fixes are required. Do not merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants