Skip to content

Conversation

siamkholo2
Copy link

This PR removes usage of the deprecated name attribute from the aws_region data source.
It replaces ${data.aws_region.current.name} with ${data.aws_region.current.region} to avoid warnings and maintain compatibility with future Terraform AWS provider versions.

@siamkholo2 siamkholo2 requested review from a team, andrew-glenn and tlindsay42 as code owners August 20, 2025 10:13
@drewmullen
Copy link
Contributor

Hello - thanks for this PR. Just thinking out loud here... if we accepted this PR, would we also need to bump the required provider version to 6.0+?

@siamkholo2
Copy link
Author

Hello - thanks for this PR. Just thinking out loud here... if we accepted this PR, would we also need to bump the required provider version to 6.0+?

Yes please. This warning for the deprecated value comes from the latest version

@drewmullen
Copy link
Contributor

Hmm, i think that would be harder to do.

Ill have to look later to see if region is an attribute of the data source for the version we have currently pinned. if it is - i have no issue merging this: https://github.com/aws-ia/terraform-aws-ipam/blob/main/providers.tf#L6

@siamkholo2
Copy link
Author

siamkholo2 commented Aug 20, 2025

Hmm, i think that would be harder to do.

Ill have to look later to see if region is an attribute of the data source for the version we have currently pinned. if it is - i have no issue merging this: https://github.com/aws-ia/terraform-aws-ipam/blob/main/providers.tf#L6

Thank you. From what i see, its currently pointing to the latest version hence i was getting this warnings. But please double check

@drewmullen
Copy link
Contributor

drewmullen commented Aug 20, 2025

hmm.. looks like the region attribute was added with v6, its not in 4.53... updating the providers.tf pin above may not be a big deal. let me think about it - in meetings today:

4.53.0 https://registry.terraform.io/providers/hashicorp/aws/4.53.0/docs/data-sources/region

thanks again for opening this :) ill get back to you shortly

@drewmullen
Copy link
Contributor

ok so i think we're fine to merge this and then just do a minor version bump. If anyone wants to stay on the old version they can version pin. Before we merge can you please:

  1. bump the required providers to 6.0: https://github.com/aws-ia/terraform-aws-ipam/blob/main/providers.tf#L6
  2. run terraform-docs (or the pre-commit)

@tlindsay42 tlindsay42 requested a review from a team August 21, 2025 15:35
@lastradanet
Copy link

@siamkholo2 , any updates on #73 (comment)?

@siamkholo2
Copy link
Author

@siamkholo2 , any updates on #73 (comment)?

I have updated the required version to 6.0 as suggested also ran terraform-doc

Copy link
Contributor

@drewmullen drewmullen left a comment

Choose a reason for hiding this comment

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

@andrew-glenn if you can please do a minor bump

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