Skip to content

Commit

Permalink
Merge pull request #16 from masterpointio/feature/bump_module_versions
Browse files Browse the repository at this point in the history
feature: bump module versions
  • Loading branch information
gberenice committed Jun 26, 2023
2 parents c2f229a + 47d7329 commit 9aef4a9
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 44 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,22 @@ Use [the awesome `gossm` project](https://github.com/gjbae1212/gossm).
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 |
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.2 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |

## Providers

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

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_asg_label"></a> [asg\_label](#module\_asg\_label) | cloudposse/label/null | 0.25.0 |
| <a name="module_kms_key"></a> [kms\_key](#module\_kms\_key) | cloudposse/kms-key/aws | 0.12.1 |
| <a name="module_logs_bucket"></a> [logs\_bucket](#module\_logs\_bucket) | cloudposse/s3-bucket/aws | 0.40.1 |
| <a name="module_logs_bucket"></a> [logs\_bucket](#module\_logs\_bucket) | cloudposse/s3-bucket/aws | 3.1.2 |
| <a name="module_logs_label"></a> [logs\_label](#module\_logs\_label) | cloudposse/label/null | 0.25.0 |
| <a name="module_role_label"></a> [role\_label](#module\_role\_label) | cloudposse/label/null | 0.25.0 |
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.25.0 |
Expand Down
83 changes: 44 additions & 39 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
module "asg_label" {
source = "cloudposse/label/null"
version = "0.25.0"

context = module.this.context

# This tag attribute is required.
# See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#propagate_at_launch
additional_tag_map = {
propagate_at_launch = "true"
}
}

module "role_label" {
source = "cloudposse/label/null"
version = "0.25.0"
Expand Down Expand Up @@ -204,7 +191,7 @@ DOC

module "logs_bucket" {
source = "cloudposse/s3-bucket/aws"
version = "0.40.1"
version = "3.1.2"

enabled = local.logs_bucket_enabled
context = module.logs_label.context
Expand All @@ -220,28 +207,40 @@ module "logs_bucket" {
user_enabled = false
versioning_enabled = true

lifecycle_rules = [
{
prefix = null
enabled = true
tags = {}

enable_glacier_transition = true
enable_deeparchive_transition = false
enable_standard_ia_transition = false
enable_current_object_expiration = false

abort_incomplete_multipart_upload_days = null
noncurrent_version_glacier_transition_days = 30
noncurrent_version_deeparchive_transition_days = 0
noncurrent_version_expiration_days = 365

standard_transition_days = 30
glacier_transition_days = 90
deeparchive_transition_days = 0
expiration_days = 0
},
]
lifecycle_configuration_rules = [{
enabled = true
id = module.logs_label.id
abort_incomplete_multipart_upload_days = 90
filter_and = null

expiration = {
days = 0
}
noncurrent_version_expiration = {
noncurrent_days = 365
}
noncurrent_version_transition = [{
noncurrent_days = 30
storage_class = "GLACIER"
},
{
noncurrent_days = 0
storage_class = "DEEP_ARCHIVE"
}]
transition = [{
days = 30
storage_class = "STANDARD_IA"
},
{
days = 90
storage_class = "GLACIER"
},
{
days = 0
storage_class = "DEEP_ARCHIVE"

}]
}]
}

resource "aws_cloudwatch_log_group" "session_logging" {
Expand Down Expand Up @@ -319,9 +318,15 @@ resource "aws_launch_template" "default" {
}

resource "aws_autoscaling_group" "default" {
name_prefix = "${module.asg_label.id}-asg"
tags = module.asg_label.tags_as_list_of_maps

name_prefix = "${module.this.id}-asg"
dynamic "tag" {
for_each = module.this.tags
content {
key = tag.key
value = tag.value
propagate_at_launch = true
}
}
launch_template {
id = aws_launch_template.default.id
version = "$Latest"
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_version = ">= 0.13.0"

required_providers {
aws = ">= 3.0"
aws = ">= 4.0"
local = ">= 1.2"
null = ">= 2.0"
}
Expand Down

0 comments on commit 9aef4a9

Please sign in to comment.