Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #17 from rhythmictech/terraform-v0.14.x
Browse files Browse the repository at this point in the history
bump all the versions
  • Loading branch information
sblack4 authored Dec 8, 2021
2 parents 16b23c5 + b64354e commit 638b17a
Show file tree
Hide file tree
Showing 12 changed files with 147 additions and 69 deletions.
45 changes: 0 additions & 45 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,6 @@ repos:
alias: terraform_tflint_nocreds
name: terraform_tflint_nocreds
- id: terraform_tfsec
- repo: local
hooks:
- id: terraform_validate
name: terraform_validate
entry: |
bash -c '
AWS_DEFAULT_REGION=us-east-1
declare -a DIRS
for FILE in "$@"
do
DIRS+=($(dirname "$FILE"))
done
for DIR in $(printf "%s\n" "${DIRS[@]}" | sort -u)
do
cd $(dirname "$FILE")
terraform init --backend=false
terraform validate .
cd ..
done
'
language: system
verbose: true
files: \.tf(vars)?$
exclude: examples
- id: tflock
name: provider_locks
entry: |
bash -c '
AWS_DEFAULT_REGION=us-east-1
declare -a DIRS
for FILE in "$@"
do
DIRS+=($(dirname "$FILE"))
done
for DIR in $(printf "%s\n" "${DIRS[@]}" | sort -u)
do
cd $(dirname "$FILE")
terraform providers lock -platform=windows_amd64 -platform=darwin_amd64 -platform=linux_amd64
cd ..
done
'
language: system
verbose: true
files: \.tf(vars)?$
exclude: examples
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion .terraform-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.6
0.14.11
40 changes: 40 additions & 0 deletions account/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
No requirements.

## Providers

Expand All @@ -17,11 +15,11 @@ No providers.
|------|--------|---------|
| <a name="module_backend"></a> [backend](#module\_backend) | rhythmictech/backend/aws | 2.1.0 |
| <a name="module_cloudtrail_bucket"></a> [cloudtrail\_bucket](#module\_cloudtrail\_bucket) | rhythmictech/cloudtrail-bucket/aws | ~> 1.2.0 |
| <a name="module_cloudtrail_logging"></a> [cloudtrail\_logging](#module\_cloudtrail\_logging) | rhythmictech/cloudtrail-logging/aws | ~> 1.1.0 |
| <a name="module_cloudtrail_logging"></a> [cloudtrail\_logging](#module\_cloudtrail\_logging) | rhythmictech/cloudtrail-logging/aws | ~> 1.3.0 |
| <a name="module_does_workspace_match_env"></a> [does\_workspace\_match\_env](#module\_does\_workspace\_match\_env) | rhythmictech/errorcheck/terraform | ~> 1.0.0 |
| <a name="module_iam_password_policy"></a> [iam\_password\_policy](#module\_iam\_password\_policy) | rhythmictech/iam-password-policy/aws | 1.0.0 |
| <a name="module_rhythmic_iam_roles"></a> [rhythmic\_iam\_roles](#module\_rhythmic\_iam\_roles) | rhythmictech/rhythmic-iam-roles/aws | ~> 1.1.0 |
| <a name="module_s3logging_bucket"></a> [s3logging\_bucket](#module\_s3logging\_bucket) | rhythmictech/s3logging-bucket/aws | ~> 1.0.1 |
| <a name="module_s3logging_bucket"></a> [s3logging\_bucket](#module\_s3logging\_bucket) | rhythmictech/s3logging-bucket/aws | ~> 2.0.0 |
| <a name="module_tags"></a> [tags](#module\_tags) | rhythmictech/tags/terraform | ~> 1.1.0 |

## Resources
Expand All @@ -48,6 +46,6 @@ No resources.
| Name | Description |
|------|-------------|
| <a name="output_cloudtrail_log_group"></a> [cloudtrail\_log\_group](#output\_cloudtrail\_log\_group) | CloudTrail CloudWatch log group |
| <a name="output_s3_bucket_access_logging"></a> [s3\_bucket\_access\_logging](#output\_s3\_bucket\_access\_logging) | S3 bucket to receive S3 bucket access logs |
| <a name="output_s3_bucket_access_logging_bucket"></a> [s3\_bucket\_access\_logging\_bucket](#output\_s3\_bucket\_access\_logging\_bucket) | S3 bucket to receive S3 bucket access logs |
| <a name="output_s3_bucket_access_logging_domain_name"></a> [s3\_bucket\_access\_logging\_domain\_name](#output\_s3\_bucket\_access\_logging\_domain\_name) | S3 bucket to receive S3 bucket access logs |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
7 changes: 3 additions & 4 deletions account/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ module "rhythmic_iam_roles" {

module "s3logging_bucket" {
source = "rhythmictech/s3logging-bucket/aws"
version = "~> 1.0.1"
version = "~> 2.0.0"

bucket_suffix = "account"
region = var.region
tags = module.tags.tags_no_name

# store for 1 yr
Expand All @@ -43,14 +42,14 @@ module "s3logging_bucket" {
module "cloudtrail_bucket" {
source = "rhythmictech/cloudtrail-bucket/aws"
version = "~> 1.2.0"
logging_bucket = module.s3logging_bucket.s3logging_bucket_name
logging_bucket = module.s3logging_bucket.s3_bucket_name
region = var.region
tags = module.tags.tags_no_name
}

module "cloudtrail_logging" {
source = "rhythmictech/cloudtrail-logging/aws"
version = "~> 1.1.0"
version = "~> 1.3.0"
region = var.region
cloudtrail_bucket = module.cloudtrail_bucket.s3_bucket_name
kms_key_id = module.cloudtrail_bucket.kms_key_id
Expand Down
6 changes: 3 additions & 3 deletions account/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ output "cloudtrail_log_group" {
value = module.cloudtrail_logging.cloudwatch_loggroup_name
}

output "s3_bucket_access_logging" {
output "s3_bucket_access_logging_bucket" {
description = "S3 bucket to receive S3 bucket access logs"
value = module.s3logging_bucket.s3logging_bucket_name
value = module.s3logging_bucket.s3_bucket_name
}

output "s3_bucket_access_logging_domain_name" {
description = "S3 bucket to receive S3 bucket access logs"
value = module.s3logging_bucket.s3logging_bucket_domain_name
value = module.s3logging_bucket.s3_bucket_domain_name
}
2 changes: 1 addition & 1 deletion account/setup/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#tfsec:ignore:aws-dynamodb-table-customer-key,aws-dynamodb-enable-recovery
#tfsec:ignore:aws-dynamodb-table-customer-key tfsec:ignore:aws-dynamodb-enable-recovery
module "backend" {
source = "rhythmictech/backend/aws"
version = "2.1.0"
Expand Down
44 changes: 44 additions & 0 deletions common/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions common/common.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ provider "aws" {

terraform {
backend "s3" {}

required_version = ">= 0.13.0"
}

# Intentionally throws an error if the workspace doesn't match the env
Expand Down
45 changes: 45 additions & 0 deletions network/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
No requirements.

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
| <a name="provider_aws"></a> [aws](#provider\_aws) | 3.68.0 |
| <a name="provider_terraform"></a> [terraform](#provider\_terraform) | n/a |

## Modules
Expand All @@ -20,7 +18,7 @@
|------|--------|---------|
| <a name="module_does_workspace_match_env"></a> [does\_workspace\_match\_env](#module\_does\_workspace\_match\_env) | rhythmictech/errorcheck/terraform | ~> 1.0.0 |
| <a name="module_tags"></a> [tags](#module\_tags) | rhythmictech/tags/terraform | ~> 1.1.0 |
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 2.44.0 |
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.11.0 |
| <a name="module_vpcflowlogs"></a> [vpcflowlogs](#module\_vpcflowlogs) | rhythmictech/vpcflowlogs/aws | ~> 1.1.2 |

## Resources
Expand Down
5 changes: 3 additions & 2 deletions network/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module "tags" {

module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "~> 2.44.0"
version = "~> 3.11.0"

name = module.tags.name
azs = var.availability_zones
Expand All @@ -47,13 +47,14 @@ module "vpc" {
tags = module.tags.tags
}

#tfsec:ignore:aws-iam-no-policy-wildcards
module "vpcflowlogs" {
source = "rhythmictech/vpcflowlogs/aws"
version = "~> 1.1.2"

create_bucket = true
create_kms_key = true
logging_bucket = data.terraform_remote_state.account.outputs.s3_bucket_access_logging
logging_bucket = data.terraform_remote_state.account.outputs.s3_bucket_access_logging_bucket
region = var.region
tags = module.tags.tags
vpc_ids = [module.vpc.vpc_id]
Expand Down

0 comments on commit 638b17a

Please sign in to comment.