diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8207150 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..5b161c9 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,7 @@ +# Use this file to define individuals or teams that are responsible for code in a repository. +# Read more: +# +# Order is important: the last matching pattern takes the most precedence + +# These owners will be the default owners for everything +* @masterpointio/masterpoint-internal diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..4b8f32d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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` + diff --git a/README.md b/README.md index bda1493..0ceaf56 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ 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 @@ -31,23 +32,28 @@ module "ssm_agent" { } 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 } ``` diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 0acc503..217f1b2 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -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" { diff --git a/main.tf b/main.tf index c96f9bc..51e5200 100644 --- a/main.tf +++ b/main.tf @@ -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" + }, ] }] }