Skip to content

Conversation

@bryantbiggs
Copy link
Member

@bryantbiggs bryantbiggs commented Dec 4, 2024

Description

List of backwards incompatible changes

  • Terraform v1.5.7 is now minimum supported version
  • AWS provider v6.0.0 is now minimum supported version
  • instance_iam_role_additional_policies, service_iam_role_additional_policies, spot_fleet_iam_role_additional_policies types are now map(string) instead of list(string)
  • IAM assume role policy SIDs have been modified to match their use (previously all were ECSAssumeRole which is inaccurate)
  • compute_environment_order is now a required argument for aws_batch_job_queue per the Batch API and replaces compute_environments

Additional changes

Added

  • Support for region parameter to specify the AWS region for the resources created if different from the provider region.
  • Support for compute_environment_order, job_state_time_limit_action, timeouts arguments for job queues
  • All (currently) supported arguments for eks_properties argument have been added to the job definition resource
  • Support for scheduling_priority and node_properties arguments for job definitions

Modified

  • Variable definitions now contain detailed object types in place of the previously used any type.
  • compute_environment_name argument has been changed to name per provider v6.x API; no-op for users
  • compute_environment_name_prefix argument has been changed to name_prefix per provider v6.x API; no-op for users

Removed

  • None

Motivation and Context

Breaking Changes

  • Yes, see docs/UPGRADE-3.0.md for more details

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@bryantbiggs
Copy link
Member Author

we'll proceed once AWS provider v6 arrives - this was originally meant to arrive in April but seems to be taking a bit longer

@bryantbiggs bryantbiggs changed the title feat!: Bump MSV of Terraform and AWS provider, update to include latest features feat!: Upgrade AWS provider and min required Terraform version to 6.0 and 1.10 respectively Jun 25, 2025
@bryantbiggs bryantbiggs marked this pull request as ready for review June 25, 2025 01:34
@bryantbiggs bryantbiggs requested a review from antonbabenko June 25, 2025 01:34
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, just a small comment/question about variable types. Such detailed variable types are a rather big change for us in the modules.

service_role = optional(string)
state = optional(string)
tags = optional(map(string), {})
type = optional(string, "MANAGED")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a detailed variable type may be a good idea, but do we need to provide a default value ("MANAGED") in the type definition or leave it empty, so that it will be null and let the AWS provider decide on the correct value? We previously left it empty for the provider to decide. I think it is still right to do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the standard practices still apply and null should be favored in 99% of the cases. in this instance, "MANAGED" was specifically chosen and is also what we have on the current module version

type = lookup(each.value, "type", "MANAGED")

For this argument users have to choose either "MANAGED" or "UNMANAGED", we've made the decision that is most common for them as the default

type = optional(string, "MANAGED")
update_policy = optional(object({
job_execution_timeout_minutes = number
terminate_jobs_on_update = optional(bool, false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here:

Suggested change
terminate_jobs_on_update = optional(bool, false)
terminate_jobs_on_update = optional(bool)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new argument thats added in this PR that is required so we are making a "sane" default for users (i.e. - don't terminate the job if you update the compute environment, instead let the job complete - which is what most will want to do in order to minimize disruptions for changes)

@bryantbiggs bryantbiggs changed the title feat!: Upgrade AWS provider and min required Terraform version to 6.0 and 1.10 respectively feat!: Upgrade AWS provider and min required Terraform version to 6.0 and 1.5.7 respectively Jun 25, 2025
@bryantbiggs bryantbiggs merged commit 7781147 into terraform-aws-modules:master Jun 25, 2025
7 checks passed
antonbabenko pushed a commit that referenced this pull request Jun 25, 2025
## [3.0.0](v2.1.0...v3.0.0) (2025-06-25)

### ⚠ BREAKING CHANGES

* Upgrade AWS provider and min required Terraform version to `6.0` and `1.5.7` respectively (#38)

### Features

* Upgrade AWS provider and min required Terraform version to `6.0` and `1.5.7` respectively ([#38](#38)) ([7781147](7781147))

### Bug Fixes

* Update CI workflow versions to latest ([#36](#36)) ([c478369](c478369))
@antonbabenko
Copy link
Member

This PR is included in version 3.0.0 🎉

@bryantbiggs bryantbiggs deleted the feat/upgrade branch June 26, 2025 12:47
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.