feat(cloud/aws): make hosted_public_zone_id optional for private-only#408
Merged
Conversation
e3451d7 to
8f33d7c
Compare
The aws-configuration provider config always included hosted_public_zone_id
in the networking payload, and the API validates its format
(^Z[A-Z0-9]{10,}$), rejecting an empty string. Private-only installs (no
public hosted zone) had no valid value to pass, so the cloud config could
not be registered.
Make the variable optional (default "") and omit it from the payload when
empty. Backward compatible: a non-empty value is still included. Adds a test
asserting the key is absent when empty and the private zone is still present.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sebastiancorrea81
approved these changes
Jun 25, 2026
sebastiancorrea81
approved these changes
Jun 25, 2026
davidf-null
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes
hosted_public_zone_idoptional in thecloud/aws/cloudmodule so private-only installations (no public hosted zone) can register the AWS provider config.Why
The module always included
hosted_public_zone_idin theattributes.networkingpayload. The API validates its format (^Z[A-Z0-9]{10,}$) and rejects an empty string, so a private-only install (which has no public zone) had no valid value to pass — the provider config could not be created.Changes
hosted_public_zone_idnow defaults to""and is omitted from the payload when empty/null (conditionalmerge). A non-empty value is included as before — fully backward compatible.validationblock: accepts empty/null (private-only) or a well-formed zone ID, catching malformed IDs at plan time instead of at the API.private_only_omits_public_zone(+ anullvariant) asserts the key is absent when empty and the private zone stays present.required: no,default: "").Verification
tofu test: 5 passed, 0 failed.pre-commit: OpenTofu fmt / validate / tofu test / trailing-whitespace / detect-private-key all pass.🤖 Generated with Claude Code