Skip to content

Conversation

@rsharmaInfoblox
Copy link
Collaborator

Resource and DataSource for rpz ptr record

@unasra unasra requested a review from Copilot December 1, 2025 04:58
Copilot finished reviewing on behalf of unasra December 1, 2025 05:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements a new resource and data source for managing RPZ (Response Policy Zone) PTR records in Infoblox NIOS. The PR adds support for creating, reading, updating, and deleting RPZ PTR records, which are used for DNS response policy management. The implementation follows the existing pattern established by the RPZ A record resource already in the codebase.

Key Changes

  • Added two new custom validators (IsValidArpaIPv4RPZ and IsValidArpaIPv6RPZ) to validate RPZ-specific ARPA format addresses that include the RPZ zone suffix
  • Implemented the nios_rpz_record_ptr resource with comprehensive CRUD operations, supporting multiple addressing modes (IPv4, IPv6, or custom name)
  • Added the nios_rpz_record_ptr data source with filtering capabilities by standard attributes and extensible attributes

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
internal/validator/ipv4_arpa_rpz_validator.go New validator for IPv4 ARPA addresses in RPZ format, validating the pattern x.x.x.x.in-addr.arpa.<rp-zone>
internal/validator/ipv6_arpa_rpz_validator.go New validator for IPv6 ARPA addresses in RPZ format, validating the pattern x.x.x...x.ip6.arpa.<rp-zone> with 32 hex nibbles
internal/service/rpz/record_rpz_ptr_resource.go Main resource implementation with CRUD operations, configuration validation, and import support
internal/service/rpz/model_record_rpz_ptr.go Data model and schema definitions for the RPZ PTR record resource
internal/service/rpz/record_rpz_ptr_data_source.go Data source implementation with pagination and filtering support
internal/service/rpz/record_rpz_ptr_resource_test.go Comprehensive acceptance tests covering all resource attributes and operations
internal/service/rpz/record_rpz_ptr_data_source_test.go Acceptance tests for data source filtering capabilities
internal/provider/provider.go Registration of the new resource and data source with the provider
examples/resources/nios_rpz_record_ptr/resource.tf Example configurations demonstrating various use cases
examples/data-sources/nios_rpz_record_ptr/data-source.tf Example data source queries
docs/resources/rpz_record_ptr.md Generated documentation for the resource
docs/data-sources/rpz_record_ptr.md Generated documentation for the data source

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

Copy link
Collaborator

@unasra unasra left a comment

Choose a reason for hiding this comment

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

LGTM
@JchhatbarInfoblox Please take a look !

@unasra unasra changed the title NPA-1227: Resource and DataSource for rpz ptr record NPA-1227: Resource and DataSource for RPZ PTR Record Dec 2, 2025
Copy link
Collaborator

@JchhatbarInfoblox JchhatbarInfoblox left a comment

Choose a reason for hiding this comment

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

LGTM

@JchhatbarInfoblox
Copy link
Collaborator

JchhatbarInfoblox commented Dec 2, 2025

@rsharmaInfoblox Please resolve the conflicts.

@JchhatbarInfoblox JchhatbarInfoblox self-requested a review December 2, 2025 05:57
Copy link
Collaborator

@JchhatbarInfoblox JchhatbarInfoblox left a comment

Choose a reason for hiding this comment

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

LGTM

@JchhatbarInfoblox JchhatbarInfoblox merged commit 37e1190 into infobloxopen:feature Dec 2, 2025
3 checks passed
Chaithra001 pushed a commit to Chaithra001/terraform-provider-nios that referenced this pull request Dec 2, 2025
* NPA-1227: added resource and data source for rpz ptr record

* NPA-1227: added fix for sending rp_zone in update req because of wapi behavior

* NPA-1227: removed duplicate parent zone func

* NPA-1227: fixed some markdown desc comments and cosmetic changes

* NPA-1227: used exactly one of validator instead of validate config for name, ipv4 and ipv6 presence

* NPA-1227: added base func for custom view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants