Skip to content

Commit dbd82ca

Browse files
feat: fix deprecation warning (#47)
## what While working in a tf module that uses this module, I got this warning, ```sh │ Warning: Deprecated attribute │ │ on .terraform/modules/tailscale_subnet_router/main.tf line 41, in locals: │ 41: region = coalesce(var.region, data.aws_region.current.name) │ │ The attribute "name" is deprecated. Refer to the provider documentation for details. │ │ (and 2 more similar warnings elsewhere) ``` Small change to use `id` instead of `name`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added a blank line before the "Requirements" section in the README for improved readability. * **Bug Fixes** * Updated AWS region fallback logic to use the correct identifier, ensuring accurate region references in configurations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 0106df5 commit dbd82ca

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Use [the awesome `gossm` project](https://github.com/gjbae1212/gossm).
120120
| [aws_ssm_document.session_logging](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_document) | resource |
121121
| [null_resource.validate_instance_type](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
122122
| [aws_ami.amazon_linux_2023](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
123+
| [aws_ami.instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
123124
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
124125
| [aws_iam_policy_document.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
125126
| [aws_iam_policy_document.session_logging](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module "logs_label" {
4444
}
4545

4646
locals {
47-
region = coalesce(var.region, data.aws_region.current.name)
47+
region = coalesce(var.region, data.aws_region.current.region)
4848
account_id = data.aws_caller_identity.current.account_id
4949

5050
session_logging_bucket_name = try(coalesce(var.session_logging_bucket_name, module.logs_label.id), "")

0 commit comments

Comments
 (0)