Skip to content

Bump modules/cnames AWS provider constraint to ~> 6.0 - #117

Merged
sir-sigurd merged 5 commits into
mainfrom
cnames-aws-constraint
Jun 8, 2026
Merged

Bump modules/cnames AWS provider constraint to ~> 6.0#117
sir-sigurd merged 5 commits into
mainfrom
cnames-aws-constraint

Conversation

@sir-sigurd

@sir-sigurd sir-sigurd commented Jun 8, 2026

Copy link
Copy Markdown
Member

Description

modules/cnames pinned aws ~> 5.0 (i.e. < 6.0), but it is used in the same root as modules/quilt — whose terraform-aws-modules/vpc ~> 6.0 dependency requires aws >= 6.28. The two constraints have no overlap, so any root using both modules (the topology examples/main.tf documents) fails terraform init:

Finding hashicorp/aws versions matching ">= 3.29.0, ~> 5.0, >= 6.28.0"...
Error: no available releases match the given constraints

This is the loose end of the registry-pinning sweep in #110/#112: vpc and security-group were reconciled into the 6.x/5.x world, but cnames's aws constraint was never brought along. The break is upstream-timed — vpc 6.0.0 only required aws >= 5.79 (compatible with ~> 5.0); it activated once the upstream module raised its floor past 6.0.

cnames only manages aws_route53_record, which is stable across aws 5.x and 6.x, so bumping it to ~> 6.0 (matching the vpc module) is safe and lets it resolve into 6.x alongside vpc.

Verified locally — a root combining vpc + cnames now resolves (aws v6.49.0) where it previously failed init.

It also adds a regression guard: the quilt smoke-test wrapper now composes cnames in the same root, so CI's terraform init resolves both modules' AWS provider constraints together. No CI job did that before — each module is validated standalone — which is why this conflict went unnoticed across releases. A future incompatible pin on either module now fails CI at init.

TODO

  • CHANGELOG entry
  • I promise to deploy to dev stacks (including nightly) soon after PR is merged so we really have these changes tested

Greptile Summary

This PR fixes a Terraform provider constraint conflict where modules/cnames pinned aws ~> 5.0 while modules/quilt's transitive dependency (terraform-aws-modules/vpc ~> 6.0) requires aws >= 6.28, making the two constraints irresolvable in a shared root. The fix bumps cnames to ~> 6.0 and adds a regression guard by composing cnames into the quilt smoke-test wrapper so future constraint divergence fails CI at terraform init.

  • modules/cnames/main.tf: Single-line bump from ~> 5.0 to ~> 6.0; aws_route53_record is stable across both major versions so no resource changes are needed.
  • modules/quilt/tests/smoke/main.tf: Adds a module \"cnames\" block with valid dummy inputs (all required variables supplied, ttl has a default) to make init exercise both modules' provider constraints together.
  • CHANGELOG.md / smoke.tftest.hcl: Changelog entry and updated test header comment to document the guard.

Confidence Score: 5/5

Safe to merge — single-line provider constraint bump with no resource changes and a well-constructed regression guard added to CI.

The fix is minimal and surgical: aws_route53_record has no breaking changes between aws 5.x and 6.x, so bumping the constraint carries no operational risk. The dummy inputs in the smoke wrapper are all valid (required variables supplied, ttl defaults to 60, the quilt_web_host regex matches the supplied value), so the plan-only mocked tests will continue to pass. The regression guard correctly closes the gap that allowed this conflict to go undetected across prior releases.

No files require special attention.

Important Files Changed

Filename Overview
modules/cnames/main.tf Bumps AWS provider constraint from ~> 5.0 to ~> 6.0; aws_route53_record is unchanged and stable across both major versions.
modules/quilt/tests/smoke/main.tf Adds module "cnames" with all required variables (dummy values valid for plan + regex) and removes now-stale inline note about cnames pinning ~> 5.0.
modules/quilt/tests/smoke/smoke.tftest.hcl Header comment updated to document the new cross-module constraint guard; no test logic changes.
CHANGELOG.md Adds [Fixed] entry under [Unreleased] accurately describing the constraint conflict and its resolution.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["terraform init (shared root)"] --> B{Resolve aws provider}
    B --> C["modules/cnames\nrequires aws ~> 6.0"]
    B --> D["modules/quilt\n(via vpc ~> 6.0)\nrequires aws >= 6.28"]
    C --> E["Intersection: aws >= 6.0, < 7.0"]
    D --> E
    E --> F["✅ Resolves (e.g. aws v6.49.0)"]

    subgraph "Before this PR"
        G["modules/cnames\nrequires aws ~> 5.0"]
        H["modules/quilt\nrequires aws >= 6.28"]
        G --> I["❌ No overlap — init fails"]
        H --> I
    end

    subgraph "CI Regression Guard"
        J["smoke/main.tf\ncompose quilt + cnames"] --> K["terraform init\nexercises both constraints"]
        K --> L["Future pin conflict\nfails CI at init"]
    end
Loading

Reviews (4): Last reviewed commit: "Tighten cnames guard comment in smoke wr..." | Re-trigger Greptile

sir-sigurd and others added 2 commits June 8, 2026 17:52
The cnames module pinned aws `~> 5.0` (< 6.0), but it is used alongside
the vpc module, whose `terraform-aws-modules/vpc ~> 6.0` dependency
requires aws >= 6.28. A root using both modules (the topology
`examples/main.tf` documents) failed `terraform init` with an
unsatisfiable provider constraint. Widen to `>= 5.79, < 7.0` so it
resolves into 6.x while still blocking the next major — completing the
registry-pinning reconciliation started in #110/#112.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sir-sigurd
sir-sigurd requested a review from Copilot June 8, 2026 13:01
@sir-sigurd

Copy link
Copy Markdown
Member Author

@greptileai please review

Copilot AI left a comment

Copy link
Copy Markdown

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 widens the hashicorp/aws provider constraint in modules/cnames to eliminate an unresolvable version intersection when cnames is used alongside quilt/vpc-dependent module trees that require AWS provider 6.x.

Changes:

  • Relax modules/cnames AWS provider version constraint from ~> 5.0 to >= 5.79, < 7.0 (allowing both 5.x and 6.x).
  • Add an Unreleased CHANGELOG entry documenting the fix and the previously failing terraform init scenario.

Reviewed changes

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

File Description
modules/cnames/main.tf Broadens the AWS provider constraint to span 5.x–6.x to avoid conflicts with vpc’s transitive aws >= 6.28 floor.
CHANGELOG.md Records the provider-constraint relaxation under Unreleased.

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

Comment thread modules/cnames/main.tf Outdated
Comment thread modules/cnames/main.tf Outdated
Match the registry-pinning convention (~>) used by the vpc module
rather than a bare range; the rationale lives in the CHANGELOG and PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sir-sigurd sir-sigurd changed the title Relax modules/cnames AWS provider constraint to span 6.x Bump modules/cnames AWS provider constraint to ~> 6.0 Jun 8, 2026
@sir-sigurd
sir-sigurd requested a review from Copilot June 8, 2026 13:15
@sir-sigurd

Copy link
Copy Markdown
Member Author

@greptileai the constraint was changed from >= 5.79, < 7.0 to ~> 6.0 and the inline comment was dropped — please re-review the latest commit.

Copilot AI left a comment

Copy link
Copy Markdown

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 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread modules/cnames/main.tf
Comment thread CHANGELOG.md
@sir-sigurd
sir-sigurd requested a review from nl0 June 8, 2026 13:32
@sir-sigurd
sir-sigurd enabled auto-merge (squash) June 8, 2026 13:33
@sir-sigurd
sir-sigurd disabled auto-merge June 8, 2026 13:38
sir-sigurd and others added 2 commits June 8, 2026 18:50
The quilt/cnames provider conflict went unnoticed because CI only ever
validates each module standalone — no job composed two modules in one
root, so their combined AWS provider constraints were never resolved.

Compose `cnames` alongside `quilt` in the smoke wrapper so the test
job's `terraform init` resolves both modules' constraints together. A
future incompatible pin on either module now fails init in CI (verified:
reverting cnames to `~> 5.0` makes this wrapper's init fail). Also drops
the now-stale cnames note from the root provider-pin comment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sir-sigurd
sir-sigurd requested a review from Copilot June 8, 2026 14:05
@sir-sigurd

Copy link
Copy Markdown
Member Author

@greptileai this PR now also adds a cross-module provider guard (composes cnames into the quilt smoke wrapper) — please re-review the latest commit.

Copilot AI left a comment

Copy link
Copy Markdown

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 4 out of 4 changed files in this pull request and generated no new comments.

@sir-sigurd
sir-sigurd merged commit b6de919 into main Jun 8, 2026
10 checks passed
@sir-sigurd
sir-sigurd deleted the cnames-aws-constraint branch June 8, 2026 14:22
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