Skip to content

Upgrade Terraform AWS provider from ~> 5.25.0 to v6 #3564

Description

@davidsmejia

Context

The AWS provider version constraint in infrastructure/backend.tf and infrastructure/batch/versions.tf is pinned to ~> 5.25.0. This pin was added as a hotfix after a staging deploy failed when Terraform resolved to the latest available version (v6.43.0), which introduced breaking changes incompatible with our current configs. The pin keeps deploys working but leaves us on an older provider series and blocks access to newer AWS resource features.

Problem or idea

The following Terraform resources use arguments that were removed or renamed in the AWS provider v6.0.0 release:

  • infrastructure/networking.tf — aws_eip.data_refinery_api_ip uses vpc = true (removed; replaced by domain = "vpc")
  • infrastructure/batch/compute.tf — all three aws_batch_compute_environment resources use compute_environment_name (renamed to name)
  • infrastructure/batch/job_queue.tf — all three aws_batch_job_queue resources use compute_environments = [...] (replaced by a compute_environment_order { } block)

Until these are updated the version pin cannot be bumped.

Solution or next step

  1. Update the three files above to use the v6 argument names/shapes (diffs are straightforward — see the v6 upgrade guide)
  2. Bump the constraint to ~> 6.0 in both backend.tf and batch/versions.tf
  3. Run terraform init -upgrade on the deploy box to pull v6
  4. Validate with terraform plan against staging before tagging a release

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions