Skip to content

Commit

Permalink
Merge pull request #17 from masterpointio/fix/lifecycle_rules
Browse files Browse the repository at this point in the history
fix: lifecycle rules + repo chores
  • Loading branch information
gberenice committed Jun 26, 2023
2 parents 9aef4a9 + 83ff946 commit 76992e9
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 46 deletions.
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{tf,tfvars}]
indent_size = 2
indent_style = space

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

# Override for Makefile
[{Makefile, makefile, GNUmakefile, Makefile.*}]
tab_width = 2
indent_style = tab
indent_size = 4

[COMMIT_EDITMSG]
max_line_length = 0
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Use this file to define individuals or teams that are responsible for code in a repository.
# Read more: <https://help.github.com/articles/about-codeowners/>
#
# Order is important: the last matching pattern takes the most precedence

# These owners will be the default owners for everything
* @masterpointio/masterpoint-internal
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## what
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
* Use bullet points to be concise and to the point.

## why
* Provide the justifications for the changes (e.g. business case).
* Describe why these changes were made (e.g. why do these commits fix the problem?)
* Use bullet points to be concise and to the point.

## references
* Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
* Use `closes #123`, if this PR closes a GitHub issue `#123`

36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,37 @@ Big shout out to the following projects which this project uses/depends on/menti

```hcl
module "ssm_agent" {
source = "git::https://github.com/masterpointio/terraform-aws-ssm-agent.git?ref=tags/0.1.0"
source = "masterpointio/ssm-agent/aws"
version = "0.15.1"
stage = var.stage
namespace = var.namespace
vpc_id = module.vpc.vpc_id
subnet_ids = module.subnets.private_subnet_ids
}
module "vpc" {
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.10.0"
namespace = var.namespace
stage = var.stage
name = var.name
cidr_block = "10.0.0.0/16"
source = "cloudposse/vpc/aws"
version = "2.1.0"
namespace = var.namespace
stage = var.stage
name = var.name
ipv4_primary_cidr_block = "10.0.0.0/16"
assign_generated_ipv6_cidr_block = true
}
module "subnets" {
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.19.0"
availability_zones = var.availability_zones
namespace = var.namespace
stage = var.stage
vpc_id = module.vpc.vpc_id
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
nat_gateway_enabled = var.nat_gateway_enabled
nat_instance_enabled = ! var.nat_gateway_enabled
source = "cloudposse/dynamic-subnets/aws"
version = "2.3.0"
namespace = var.namespace
stage = var.stage
availability_zones = var.availability_zones
vpc_id = module.vpc.vpc_id
igw_id = [module.vpc.igw_id]
ipv4_cidr_block = [module.vpc.vpc_cidr_block]
ipv6_enabled = var.ipv6_enabled
}
```

Expand Down
33 changes: 19 additions & 14 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,28 @@ provider "aws" {
}

module "vpc" {
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.26.1"
namespace = var.namespace
stage = var.stage
name = var.name
cidr_block = "10.0.0.0/16"
source = "cloudposse/vpc/aws"
version = "2.1.0"

namespace = var.namespace
stage = var.stage
name = var.name

ipv4_primary_cidr_block = "10.0.0.0/16"
assign_generated_ipv6_cidr_block = true
}

module "subnets" {
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.39.3"
availability_zones = var.availability_zones
namespace = var.namespace
stage = var.stage
vpc_id = module.vpc.vpc_id
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
nat_gateway_enabled = var.nat_gateway_enabled
nat_instance_enabled = !var.nat_gateway_enabled
source = "cloudposse/dynamic-subnets/aws"
version = "2.3.0"
namespace = var.namespace
stage = var.stage

availability_zones = var.availability_zones
vpc_id = module.vpc.vpc_id
igw_id = [module.vpc.igw_id]
ipv4_cidr_block = [module.vpc.vpc_cidr_block]
ipv6_enabled = var.ipv6_enabled
}

module "ssm_agent" {
Expand Down
21 changes: 4 additions & 17 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -222,24 +222,11 @@ module "logs_bucket" {
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"

}]
days = 90
storage_class = "GLACIER"
}, ]
}]
}

Expand Down

0 comments on commit 76992e9

Please sign in to comment.