Skip to content

feat!: Update Terraform and AWS provider versions to 1.11 and 6.0 respectively #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

take-five
Copy link
Contributor

@take-five take-five commented Jul 28, 2025

Description

  • Terraform v1.11 is now minimum supported version; required for ephemeral resources and write only arguments
  • AWS provider v6.0 is now minimum supported version
  • Support for region parameter to specify the AWS region for the resources created if different from the provider region.
  • Variable definitions now contain detailed object types in place of the previously used any type
  • Support for generating a random password has been updated to use the new ephemeral resource type and passed to a write only attribute to ensure secrets are not persisted in the Terraform statefile
  • Adds support for secret_string_wo, secret_string_wo_version, and rotate_immediately arguments

Motivation and Context

Breaking Changes

  • Yes

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

@take-five
Copy link
Contributor Author

@bryantbiggs Would you mind taking a look at this please? :-)

@bryantbiggs bryantbiggs changed the title feat: Upgrade AWS provider to 6.0 feat!: Update Terraform and AWS provider versions to 1.11 and 6.0 respectively Aug 5, 2025
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

looks good to me but I'll let @antonbabenko chime in given the changes I made and version bump

ps - ephemeral resources and write only arguments are .... awful ! I don't get them, nor do I see their value but since folks have asked, we'll support them I guess

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.

I'd really like to have support for ephemerals within the module as well. The rest is great :)

@@ -38,8 +38,8 @@ module "secrets_manager" {
# Policy
create_policy = true
block_public_policy = true
policy_statements = {
read = {
policy_statements = [
Copy link
Member

Choose a reason for hiding this comment

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

What was the reason for the change from map to list? I like maps, because keys there are like comments. Also, *_statements are maps in other modules, I guess.

Copy link
Member

Choose a reason for hiding this comment

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

crap, looks like I've mixed up and some are maps some are lists in the other updated modules - I'll move this back to a map

Copy link
Member

@bryantbiggs bryantbiggs Aug 8, 2025

Choose a reason for hiding this comment

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

fixed in f5ac140


function_name = local.name
description = "Example Secrets Manager secret rotation lambda function"

handler = "function.lambda_handler"
runtime = "python3.10"
runtime = "python3.12"
Copy link
Member

Choose a reason for hiding this comment

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

Just for being lazy for another more year, let's put it to python3.13 :)

Copy link
Member

Choose a reason for hiding this comment

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

fixed in 9682e45

@@ -127,6 +126,12 @@ module "secrets_manager_disabled" {
# Supporting Resources
################################################################################

ephemeral "random_password" "password" {
Copy link
Member

Choose a reason for hiding this comment

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

ephemeral outside of the module is fine, but I think we should have ephemeral within the module as well. This way, users can just call the module without any external resources/ephemerals.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like OpenTofu doesn't support ephemeral variables yet, so if we add ephemeral variables into the module, it will break it for OpenTofu users.

https://opentofu.org/docs/language/values/variables/#arguments

Copy link
Member

Choose a reason for hiding this comment

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

re-added using ephemeral resource 9682e45

@take-five
Copy link
Contributor Author

@bryantbiggs Are you going to address @antonbabenko's comments or should I?

@bryantbiggs
Copy link
Member

I will get to this today

@bryantbiggs bryantbiggs merged commit 850b8bd into terraform-aws-modules:master Aug 9, 2025
7 checks passed
antonbabenko pushed a commit that referenced this pull request Aug 9, 2025
## [2.0.0](v1.3.1...v2.0.0) (2025-08-09)

### ⚠ BREAKING CHANGES

* Update Terraform and AWS provider versions to `1.11` and `6.0` respectively (#14)

### Features

* Update Terraform and AWS provider versions to `1.11` and `6.0` respectively ([#14](#14)) ([850b8bd](850b8bd))
@antonbabenko
Copy link
Member

This PR is included in version 2.0.0 🎉

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.

Warning: Available Write-only Attribute Alternative
3 participants