Skip to content

Commit b6de919

Browse files
sir-sigurdclaude
andauthored
Bump modules/cnames AWS provider constraint to ~> 6.0 (#117)
* Relax modules/cnames AWS provider constraint to span 6.x 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> * Add CHANGELOG entry for cnames provider constraint fix (#117) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Use ~> 6.0 for cnames AWS pin; drop inline comment 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> * Add cnames to the smoke wrapper as a cross-module provider guard 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> * Tighten cnames guard comment in smoke wrapper Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 70559d2 commit b6de919

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Optional release notice.
1818

1919
## [Unreleased] - YYYY-MM-DD
2020

21+
- [Fixed] Bump `modules/cnames` AWS provider constraint from `~> 5.0` to `~> 6.0` so it resolves alongside the `vpc` module's `aws >= 6.28` requirement — using `quilt` + `cnames` in one root previously failed `terraform init` ([#117](https://github.com/quiltdata/iac/pull/117))
22+
2123
## [1.7.1] - 2026-06-04
2224

2325
- [Fixed] Pin every registry module with `~>` so an upstream major can't silently break `terraform plan`/`apply` — resolves the `security-group` v6.0.0 break and constrains the rest (`security-group`/`rds``~> 5.0`, `vpc``~> 6.0`) ([#110](https://github.com/quiltdata/iac/pull/110), [#112](https://github.com/quiltdata/iac/pull/112))

modules/cnames/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
aws = {
44
source = "hashicorp/aws"
5-
version = "~> 5.0"
5+
version = "~> 6.0"
66
}
77
}
88
}

modules/quilt/tests/smoke/main.tf

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ terraform {
1616
source = "hashicorp/aws"
1717
# Match what the modules under test transitively require: the
1818
# terraform-aws-modules/vpc ~> 6.0 module needs aws >= 6.28. Pinning keeps
19-
# CI deterministic and off a future major. (Note: examples/main.tf and
20-
# modules/cnames still pin ~> 5.0, which is incompatible with that floor.)
19+
# CI deterministic and off a future major.
2120
version = "~> 6.0"
2221
}
2322
}
@@ -87,6 +86,17 @@ module "quilt" {
8786
user_subnets = var.user_subnets
8887
}
8988

89+
# Compose `cnames` with `quilt` so CI's init resolves both modules' AWS
90+
# provider constraints together — a future incompatible pin fails init here.
91+
# Inputs are literal dummies; this guards resolution, not value flow.
92+
module "cnames" {
93+
source = "../../../cnames"
94+
95+
zone_id = "Z00000000000000000000"
96+
quilt_web_host = "quilt-test.example.com"
97+
lb_dns_name = "test-lb.example.com"
98+
}
99+
90100
# Re-expose ONLY the non-sensitive stack name. Do not output module.quilt.stack
91101
# (it embeds the DB URL + admin password) or any *_password value — a sensitive
92102
# root output makes `terraform test` fail, which is the whole reason this

modules/quilt/tests/smoke/smoke.tftest.hcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Plan-only with the AWS provider mocked: no credentials, no infrastructure.
55
# Exercises the full wiring (vpc + db + search + the CloudFormation stack), so
66
# a change that breaks the public boundary or the vpc pass-through fails in CI.
7+
# The wrapper also composes the `cnames` module (see main.tf), so an AWS
8+
# provider constraint that can't resolve across quilt + cnames fails at init.
79
#
810
# Assertions reference known inputs (the stack name), not mocked computed
911
# attributes, whose generated values are intentionally arbitrary.

0 commit comments

Comments
 (0)