refactor(gcp): unify GCP modules removing Azure-leaked duplicates#294
Merged
refactor(gcp): unify GCP modules removing Azure-leaked duplicates#294
Conversation
dab5e35 to
31141d3
Compare
sebastiancorrea81
approved these changes
Apr 20, 2026
Port the labels/tags feature from the duplicate acr module. Before consolidating the two modules, artifact-registry lacks the ability to set labels on the google_artifact_registry_repository, which is a first-class GCP feature and was supported only in acr. Adding it here ensures no feature is lost when acr is removed.
…ne_id output Port features from the duplicate dns module before consolidating: - zone_name becomes optional (default null). When omitted, it is derived from domain_name by replacing dots with dashes. Explicit zone_name still wins when provided. - Add tags variable and labels = var.tags on the google_dns_managed_zone resource, mirroring the first-class label support GCP offers for managed zones. - Add zone_id output (the resource .id attribute) alongside zone_name and name_servers, so consumers can reference the zone without a second data lookup. - Enrich existing output descriptions. - Add test cases for the derivation and labels behaviors.
Outputs without descriptions surface as "n/a" in the terraform-docs generated README tables, degrading the published contract for consumers. The duplicate nat and vnet modules had these descriptions; restoring them here before removing those duplicates.
Completes the rename declared in 3a619f8 (Jan 27, "feat(gcp): unify variable names and rename modules for consistency") which added new directories without removing the originals, leaving four duplicate module pairs that coexisted for three months with divergent variable shapes. Keeping the GCP-native names (artifact-registry, cloud-dns, cloud-nat, vpc) and removing the Azure-leaked copies (acr, dns, nat, vnet). The surviving modules retain their tftest.hcl coverage and the more flexible google provider version constraint (>= 5.0, < 7.0). Features that were only present in the deleted modules have been ported to the kept ones in the preceding commits of this branch: - artifact-registry now supports labels via tags variable - cloud-dns now supports optional zone_name derivation, labels and exposes zone_id output - cloud-nat and vpc output descriptions restored Deleted: - infrastructure/gcp/acr/ - infrastructure/gcp/dns/ - infrastructure/gcp/nat/ - infrastructure/gcp/vnet/ Breaking change for any external consumer pinning to these paths.
31141d3 to
47a7533
Compare
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.
Summary
acr/,dns/,nat/,vnet/) — canonical names areartifact-registry/,cloud-dns/,cloud-nat/,vpc/tagsvariable toartifact-registryfor repository labels and Workload Identity binding supportzone_namederivation tocloud-dns(auto-derived from domain if not provided: dots replaced with hyphens) andlabelssupportzone_idoutput tocloud-dnscloud-natandvpcoutputs