Skip to content

ci: require AWS provider v6 in the Terraform tests - #38584

Closed
bosconi wants to merge 1 commit into
mainfrom
jc/terraform-aws-provider-v6
Closed

ci: require AWS provider v6 in the Terraform tests#38584
bosconi wants to merge 1 commit into
mainfrom
jc/terraform-aws-provider-v6

Conversation

@bosconi

@bosconi bosconi commented Aug 31, 2026

Copy link
Copy Markdown
Member

Motivation

terraform-aws and terraform-aws-upgrade have failed on every nightly since #18164 (2026-08-25), six consecutive builds, plus both v26.40.0 RC nightlies. terraform init cannot resolve a provider:

Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/aws: no available releases match the given constraints
~> 5.0, >= 5.92.0, >= 6.0.0, ~> 6.0, >= 6.28.0, >= 6.59.0

test/terraform/ sources the self-managed modules at ref=main. Those modules moved to hashicorp/aws ~> 6.0 in MaterializeInc/materialize-terraform-self-managed#390 ("DEP-200 aws: upgrade to AWS provider v6 and EKS module v21"), merged 2026-08-25 19:08 UTC. Our providers.tf still pinned ~> 5.0, so the constraint set became unsatisfiable and the next nightly, which started 4h50m later, broke.

Description

Bump the hashicorp/aws constraint to ~> 6.0 in all three AWS configurations. aws-persistent is not in the failing set, but it sources the same modules at the same floating ref, so it carried the same unsatisfiable constraint and is fixed here too rather than left to surface later.

Only the AWS provider needed changing. The other constraints in those files (kubernetes, helm, random, kubectl) already resolved in the failing run.

Verification

Per directory, locally:

Directory terraform init -backend=false terraform validate
aws-temporary resolves, aws 6.62.0 Success
aws-upgrade resolves Success
aws-persistent resolves Success

Tips for reviewer

This unblocks init; it may not be sufficient for apply. Upstream #390 also moved the EKS module to v21, and I have no AWS credentials to run a plan. The variable changes in that PR are purely additive with defaults, so our existing module calls stay valid — but one of the two new variables is worth flagging, because its own description names the failure mode:

partition — AWS partition (e.g. from a root-level aws_partition data source). Strongly recommended when this module call carries a depends_on: without it the upstream module looks the partition up via a count-gated data source, which a module-level depends_on defers to apply time, failing the plan with 'Invalid count argument' whenever the depended-on module has pending changes.

All three of our configurations call eks-node-group with depends_on = [module.eks] and none defines a root-level aws_partition or aws_caller_identity data source, so that trap applies to us. I have deliberately left it out of this PR to keep the diff to the one verified failure; if a nightly run hits Invalid count argument, the follow-up is to add those two data sources and pass partition/account_id to the eks-node-group calls.

Separately, sourcing these modules at ref=main is what let an upstream merge break our nightly with no PR-time signal. Pinning a tag or SHA would trade that for deliberate bumps; not proposed here.

🤖 Generated with Claude Code

The self-managed Terraform modules, which `test/terraform/` sources at
`ref=main`, moved to `hashicorp/aws ~> 6.0` in
MaterializeInc/materialize-terraform-self-managed#390 (merged 2026-08-25
19:08 UTC). Our own `providers.tf` still pinned `~> 5.0`, leaving the
constraint set unsatisfiable, so `terraform init` failed outright:

    Error: Failed to query available provider packages
    Could not retrieve the list of available versions for provider
    hashicorp/aws: no available releases match the given constraints
    ~> 5.0, >= 5.92.0, >= 6.0.0, ~> 6.0, >= 6.28.0, >= 6.59.0

Bump all three AWS configurations to `~> 6.0`. `aws-persistent` was not
in the failing set but sources the same modules at the same floating
ref, so it carried the same unsatisfiable constraint.

Verified locally per directory: `terraform init` resolves (aws 6.62.0)
and `terraform validate` passes for aws-temporary, aws-upgrade and
aws-persistent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@bosconi
bosconi requested review from bobbyiliev and ggevay August 31, 2026 19:09
@ggevay

ggevay commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Oh, this seems to be the same thing as what I tried to do now in #38695
I ended up making a mess with it with doing a CI run, because it's not enough to bump the version, see the second commit of that PR. I've notified the cloud team, and I think we are unfortunately blocked on them, because the test can't be run now due to conflicts with the orphaned resources, and I don't dare trying to clean them up myself.

bosconi commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

I should have looped in the Cloud team once it was obvious that the version bump alone would cut it. Thank you for doing that. Once this is resolved, I will work with them to see if have to do anything special to get mz-context-graph upgraded.

@bobbyiliev

Copy link
Copy Markdown
Contributor

Heads up, not closing since it's your PR, but #38695 has the same bump and its first commit is identical to this one, so only one should land.

@bosconi

bosconi commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Superseded by #38695

@bosconi bosconi closed this Sep 9, 2026
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