Skip to content

Commit 22004a4

Browse files
authored
chore: Upgrade modules to address provider deprecations (#76)
## what - Upgrades `masterpointio/ssm-agent/aws` to v1.8.0 to address AWS provider deprecations: ``` on .terraform/modules/tailscale.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. ``` - Bump AWS provider required version to >= 5.0 (matching the SSM agent module) ## why Fix AWS provider deprecation warnings. ## references <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated SSM Agent module to version 1.8.0 * Updated IAM Policy module to version 2.0.2 * Upgraded AWS provider requirement to version 5.0 or later <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 013ef57 commit 22004a4

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
locals {
2-
32
primary_tag = coalesce(var.primary_tag, module.this.id)
43
prefixed_primary_tag = "tag:${local.primary_tag}"
54
prefixed_additional_tags = [for tag in var.additional_tags : "tag:${tag}"]
@@ -37,7 +36,7 @@ locals {
3736
# trivy:ignore:AVD-AWS-0090
3837
module "tailscale_subnet_router" {
3938
source = "masterpointio/ssm-agent/aws"
40-
version = "1.4.0"
39+
version = "1.8.0"
4140

4241
context = module.this.context
4342
tags = module.this.tags
@@ -99,7 +98,7 @@ module "ssm_state" {
9998
module "ssm_policy" {
10099
count = var.ssm_state_enabled ? 1 : 0
101100
source = "cloudposse/iam-policy/aws"
102-
version = "2.0.1"
101+
version = "2.0.2"
103102

104103
name = var.ssm_policy_name
105104
description = "Additional SSM access for SSM Agent of ${module.this.id} subnet router."

tests/locals.tftest.hcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ run "test_local_userdata_rendered_template" {
5858
command = apply # because we need access to the tailscale_tailnet_key.default.key value
5959

6060
variables {
61-
primary_tag = "test-router"
61+
primary_tag = "test-router"
6262
additional_tags = ["test-tag1", "test-tag2"]
6363
}
6464

@@ -74,7 +74,7 @@ run "test_local_userdata_rendered_template" {
7474

7575
# Ensure userdata script contains transformed additional tags
7676
assert {
77-
condition = strcontains(local.userdata, "tag:test-tag1") && strcontains(local.userdata, "tag:test-tag2")
77+
condition = strcontains(local.userdata, "tag:test-tag1") && strcontains(local.userdata, "tag:test-tag2")
7878
error_message = "Expected userdata to contain additional tags"
7979
}
8080
}
@@ -88,7 +88,7 @@ run "test_tailscaled_extra_flags" {
8888

8989
# Test that tailscaled_extra_flags are rendered in userdata
9090
assert {
91-
condition = strcontains(local.userdata, "--state=mem:") && strcontains(local.userdata, "--verbose=1")
91+
condition = strcontains(local.userdata, "--state=mem:") && strcontains(local.userdata, "--verbose=1")
9292
error_message = "Expected userdata to contain tailscaled extra flags"
9393
}
9494
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 5.0"
88
}
99
tailscale = {
1010
source = "tailscale/tailscale"

0 commit comments

Comments
 (0)