-
Notifications
You must be signed in to change notification settings - Fork 63
DNS Support #141
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
DNS Support #141
Conversation
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 PR introduces DNS zone management support to the Hetzner Cloud API client, addressing issue #140. The implementation adds comprehensive functionality for managing DNS zones, resource record sets (RRSets), and related DNS operations through the Hetzner Cloud API.
- Adds core DNS zone management models: Zones, Zone, RRSet, and supporting classes
- Implements full CRUD operations for zones and resource record sets
- Provides DNS-specific operations like zonefile import/export and nameserver management
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/HetznerAPIClient.php | Adds zones() method to expose DNS zone management functionality |
| src/Models/Zones/Zones.php | Implements main Zones collection class with CRUD operations for zone management |
| src/Models/Zones/Zone.php | Defines individual Zone model with operations like delete, update, protection changes, and RRSet management |
| src/Models/Zones/RRSet.php | Implements Resource Record Set model with CRUD operations and record management |
| src/Models/Zones/Record.php | Simple data class representing a DNS record with value and comment |
| src/Models/Zones/ZoneMode.php | Constants class defining zone modes (primary/secondary) |
| src/Models/Zones/ZoneRequestOpts.php | Request options class for filtering zone queries |
| src/Models/Zones/RRSetRequestOpts.php | Request options class for filtering RRSet queries |
| src/Models/Zones/RRSetProtection.php | Protection model for resource record sets |
| src/Models/Zones/PrimaryNameserver.php | Data class for primary nameserver configuration |
| src/Models/Zones/AuthoritativeNameservers.php | Data class for authoritative nameserver information |
| tests/Unit/Models/Zones/*.json | Test fixtures containing sample API responses for zones and RRSets |
| tests/Unit/Models/Zones/ZonesTest.php | Unit tests for Zones collection operations |
| tests/Unit/Models/Zones/ZoneTest.php | Unit tests for individual Zone operations |
| tests/Unit/Models/Zones/RRSetTest.php | Unit tests for RRSet operations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Copilot reviewed 23 out of 23 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Is this the same functionality as https://registry.terraform.io/providers/germanbrew/hetznerdns/latest/docs ? |
|
@ThomasLandauer no. This is the new DNS API within the Hetzner Cloud API: |
|
Oops, sorry for that stupid question! That other project is the Terraform provider, while this here is the PHP representation of Hetzner resources (servers etc.)... So what this PR brings, is the ability to manage (i.e. query etc.) DNS records too. |
Closes #140