Skip to content

Commit 9aef4a9

Browse files
authored
Merge pull request #16 from masterpointio/feature/bump_module_versions
feature: bump module versions
2 parents c2f229a + 47d7329 commit 9aef4a9

File tree

3 files changed

+48
-44
lines changed

3 files changed

+48
-44
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,22 @@ Use [the awesome `gossm` project](https://github.com/gjbae1212/gossm).
6868
| Name | Version |
6969
|------|---------|
7070
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
71-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.0 |
71+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 |
7272
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.2 |
7373
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
7474

7575
## Providers
7676

7777
| Name | Version |
7878
|------|---------|
79-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.51.0 |
79+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.0 |
8080

8181
## Modules
8282

8383
| Name | Source | Version |
8484
|------|--------|---------|
85-
| <a name="module_asg_label"></a> [asg\_label](#module\_asg\_label) | cloudposse/label/null | 0.25.0 |
8685
| <a name="module_kms_key"></a> [kms\_key](#module\_kms\_key) | cloudposse/kms-key/aws | 0.12.1 |
87-
| <a name="module_logs_bucket"></a> [logs\_bucket](#module\_logs\_bucket) | cloudposse/s3-bucket/aws | 0.40.1 |
86+
| <a name="module_logs_bucket"></a> [logs\_bucket](#module\_logs\_bucket) | cloudposse/s3-bucket/aws | 3.1.2 |
8887
| <a name="module_logs_label"></a> [logs\_label](#module\_logs\_label) | cloudposse/label/null | 0.25.0 |
8988
| <a name="module_role_label"></a> [role\_label](#module\_role\_label) | cloudposse/label/null | 0.25.0 |
9089
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.25.0 |

main.tf

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
module "asg_label" {
2-
source = "cloudposse/label/null"
3-
version = "0.25.0"
4-
5-
context = module.this.context
6-
7-
# This tag attribute is required.
8-
# See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#propagate_at_launch
9-
additional_tag_map = {
10-
propagate_at_launch = "true"
11-
}
12-
}
13-
141
module "role_label" {
152
source = "cloudposse/label/null"
163
version = "0.25.0"
@@ -204,7 +191,7 @@ DOC
204191

205192
module "logs_bucket" {
206193
source = "cloudposse/s3-bucket/aws"
207-
version = "0.40.1"
194+
version = "3.1.2"
208195

209196
enabled = local.logs_bucket_enabled
210197
context = module.logs_label.context
@@ -220,28 +207,40 @@ module "logs_bucket" {
220207
user_enabled = false
221208
versioning_enabled = true
222209

223-
lifecycle_rules = [
224-
{
225-
prefix = null
226-
enabled = true
227-
tags = {}
228-
229-
enable_glacier_transition = true
230-
enable_deeparchive_transition = false
231-
enable_standard_ia_transition = false
232-
enable_current_object_expiration = false
233-
234-
abort_incomplete_multipart_upload_days = null
235-
noncurrent_version_glacier_transition_days = 30
236-
noncurrent_version_deeparchive_transition_days = 0
237-
noncurrent_version_expiration_days = 365
238-
239-
standard_transition_days = 30
240-
glacier_transition_days = 90
241-
deeparchive_transition_days = 0
242-
expiration_days = 0
243-
},
244-
]
210+
lifecycle_configuration_rules = [{
211+
enabled = true
212+
id = module.logs_label.id
213+
abort_incomplete_multipart_upload_days = 90
214+
filter_and = null
215+
216+
expiration = {
217+
days = 0
218+
}
219+
noncurrent_version_expiration = {
220+
noncurrent_days = 365
221+
}
222+
noncurrent_version_transition = [{
223+
noncurrent_days = 30
224+
storage_class = "GLACIER"
225+
},
226+
{
227+
noncurrent_days = 0
228+
storage_class = "DEEP_ARCHIVE"
229+
}]
230+
transition = [{
231+
days = 30
232+
storage_class = "STANDARD_IA"
233+
},
234+
{
235+
days = 90
236+
storage_class = "GLACIER"
237+
},
238+
{
239+
days = 0
240+
storage_class = "DEEP_ARCHIVE"
241+
242+
}]
243+
}]
245244
}
246245

247246
resource "aws_cloudwatch_log_group" "session_logging" {
@@ -319,9 +318,15 @@ resource "aws_launch_template" "default" {
319318
}
320319

321320
resource "aws_autoscaling_group" "default" {
322-
name_prefix = "${module.asg_label.id}-asg"
323-
tags = module.asg_label.tags_as_list_of_maps
324-
321+
name_prefix = "${module.this.id}-asg"
322+
dynamic "tag" {
323+
for_each = module.this.tags
324+
content {
325+
key = tag.key
326+
value = tag.value
327+
propagate_at_launch = true
328+
}
329+
}
325330
launch_template {
326331
id = aws_launch_template.default.id
327332
version = "$Latest"

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_version = ">= 0.13.0"
33

44
required_providers {
5-
aws = ">= 3.0"
5+
aws = ">= 4.0"
66
local = ">= 1.2"
77
null = ">= 2.0"
88
}

0 commit comments

Comments
 (0)