Skip to content

Terraform search implementation for network template#516

Open
AnilGadiyarHJ wants to merge 3 commits into
infobloxopen:mainfrom
AnilGadiyarHJ:ts_network_template2
Open

Terraform search implementation for network template#516
AnilGadiyarHJ wants to merge 3 commits into
infobloxopen:mainfrom
AnilGadiyarHJ:ts_network_template2

Conversation

@AnilGadiyarHJ

Copy link
Copy Markdown
Collaborator

No description provided.

@AnilGadiyarHJ AnilGadiyarHJ changed the title inital commit Terraform search implementation for network template Jun 2, 2026
@AnilGadiyarHJ AnilGadiyarHJ requested review from Copilot and unasra June 2, 2026 07:10
@AnilGadiyarHJ AnilGadiyarHJ added the do not merge Fixes are required. Do not merge. label Jun 2, 2026

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

Adds a Terraform list resource for nios_ipam_networktemplate so existing network templates can be queried via Terraform's new query/list framework, and adds resource identity support to the existing nios_ipam_networktemplate resource. Also tightens validation handling for two fields on the resource.

Changes:

  • Introduces NetworktemplateList (networktemplate_list.go) and registers it in the provider, with corresponding docs, example, and acceptance tests.
  • Adds ResourceWithIdentity (ref as identity) to the network template resource, populating identity in Create/Read/Update/ReadByExtAttrs and consuming it in ImportState.
  • Moves lease_scavenge_time range validation into ValidateConfig (to allow the special -1 value) and relaxes low_water_mark validator from Between(1, 100) to Between(0, 100) to match its 0 default.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/service/ipam/networktemplate_list.go New list resource implementation with paginated API calls and identity/resource population.
internal/service/ipam/networktemplate_list_test.go Acceptance tests for basic listing, filter, and extattr filter scenarios.
internal/service/ipam/networktemplate_resource.go Adds identity schema, identity persistence across CRUD, identity-aware import, and lease_scavenge_time validation.
internal/service/ipam/model_networktemplate.go Drops in-schema lease_scavenge_time range validator; widens low_water_mark validator to allow 0.
internal/provider/provider.go Registers NewNetworktemplateList in the provider's list resources.
examples/list-resources/nios_ipam_networktemplate/list-resource.tfquery.hcl Example tfquery configurations for the new list resource.
docs/list-resources/ipam_networktemplate.md Auto-generated documentation page for the new list resource.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 467 to 469
int64validator.Between(0, 100),
},
MarkdownDescription: "The percentage of DHCP network usage below which the Infoblox appliance generates a syslog message and sends a warning (if enabled). A number that specifies the percentage of allocated addresses. The range is from 1 to 100.",
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.

2 participants