-
Notifications
You must be signed in to change notification settings - Fork 12
NPA-1227: Resource and DataSource for RPZ PTR Record #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPA-1227: Resource and DataSource for RPZ PTR Record #278
Conversation
…e-and-datasource-for-rpz-ptr
There was a problem hiding this 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 (
IsValidArpaIPv4RPZandIsValidArpaIPv6RPZ) to validate RPZ-specific ARPA format addresses that include the RPZ zone suffix - Implemented the
nios_rpz_record_ptrresource with comprehensive CRUD operations, supporting multiple addressing modes (IPv4, IPv6, or custom name) - Added the
nios_rpz_record_ptrdata 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.
unasra
left a comment
There was a problem hiding this 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 !
JchhatbarInfoblox
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@rsharmaInfoblox Please resolve the conflicts. |
…e-and-datasource-for-rpz-ptr
…e-and-datasource-for-rpz-ptr
…e-and-datasource-for-rpz-ptr
JchhatbarInfoblox
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* 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
Resource and DataSource for rpz ptr record