Skip to content

Conversation

kirylkaminski
Copy link
Contributor

@kirylkaminski kirylkaminski commented Jul 28, 2025

As stated in the closed (not fixed) issue: version 6.0.0 of the AWS provider has deprecated the name attribute on aws_region, and a warning is now shown on ${data.aws_region.current.name}.
This change uses region attribute instead of name to fix the deprecation warning.

Motivation and Context

Fixes #255

Important changes

Terraform AWS Lambda module version has been upgraded to 8.0.1, so previously managed IAM policy and attachment should be removed from the state file to avoid cycle errors:

terraform state rm "module.notify_slack.module.lambda.aws_iam_role_policy_attachment.additional_json[0]"
terraform state rm "module.notify_slack.module.lambda.aws_iam_policy.additional_json[0]"

Also, variable var.iam_policy_path has been removed.

@kirylkaminski kirylkaminski changed the title Fix #255: change deprecated attribute in "aws_region" data source fix: change deprecated attribute in "aws_region" data source Jul 28, 2025
@kirylkaminski kirylkaminski changed the title fix: change deprecated attribute in "aws_region" data source fix: Change deprecated attribute in "aws_region" data source Jul 28, 2025
@kirylkaminski
Copy link
Contributor Author

@bryantbiggs could you please check? or someone else

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.

Please add the required changes to all versions.tf files - update the minimum Terraform version and AWS provider version.

@kirylkaminski
Copy link
Contributor Author

@antonbabenko updated versions.tf with aws provider constraints, haven't found any mentions of specific terraform version constraint hight than >=1.0

@antonbabenko antonbabenko changed the title fix: Change deprecated attribute in "aws_region" data source feat!: Upgrade min AWS provider and Terraform versions to 6.0 and 1.5.7 respectively Jul 30, 2025
@antonbabenko antonbabenko merged commit 2368d42 into terraform-aws-modules:master Jul 30, 2025
8 checks passed
antonbabenko pushed a commit that referenced this pull request Jul 30, 2025
## [7.0.0](v6.7.0...v7.0.0) (2025-07-30)

### ⚠ BREAKING CHANGES

* Upgrade min AWS provider and Terraform versions to 6.0 and 1.5.7 respectively (#256)

### Features

* Upgrade min AWS provider and Terraform versions to 6.0 and 1.5.7 respectively ([#256](#256)) ([2368d42](2368d42))
@antonbabenko
Copy link
Member

This PR is included in version 7.0.0 🎉

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 Aug 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data.aws_region.name is now deprecated in AWS 6.0.0
2 participants