Skip to content

Commit

Permalink
Merge pull request #79 from sgielen/feature/aws-ebs-encryption-by-def…
Browse files Browse the repository at this point in the history
…ault

Enable AWS EBS encryption by default for all AWS accounts.
  • Loading branch information
marwinbaumannsbp authored Feb 1, 2021
2 parents da4253f + 1b51a80 commit 31c272e
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ BUG FIXES

* Fix error when trying to read SNS topic policy from data source ([#78](https://github.com/schubergphilis/terraform-aws-mcaf-landing-zone/pull/78))

ENHANCEMENTS

* Enable AWS EBS encryption by default ([#79](https://github.com/schubergphilis/terraform-aws-mcaf-landing-zone/pull/79))

## 0.5.1 (2021-01-15)

BUG FIXES
Expand Down
5 changes: 5 additions & 0 deletions audit.tf
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,8 @@ resource "aws_iam_account_password_policy" "audit" {
require_symbols = var.aws_account_password_policy.require_symbols
require_uppercase_characters = var.aws_account_password_policy.require_uppercase_characters
}

resource "aws_ebs_encryption_by_default" "audit" {
provider = aws.audit
enabled = var.aws_ebs_encryption_by_default
}
5 changes: 5 additions & 0 deletions logging.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@ resource "aws_iam_account_password_policy" "logging" {
require_symbols = var.aws_account_password_policy.require_symbols
require_uppercase_characters = var.aws_account_password_policy.require_uppercase_characters
}

resource "aws_ebs_encryption_by_default" "logging" {
provider = aws.logging
enabled = var.aws_ebs_encryption_by_default
}
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,7 @@ resource "aws_iam_account_password_policy" "master" {
require_symbols = var.aws_account_password_policy.require_symbols
require_uppercase_characters = var.aws_account_password_policy.require_uppercase_characters
}

resource "aws_ebs_encryption_by_default" "master" {
enabled = var.aws_ebs_encryption_by_default
}
3 changes: 3 additions & 0 deletions modules/avm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,6 @@ resource "aws_iam_account_password_policy" "default" {
require_uppercase_characters = var.account_password_policy.require_uppercase_characters
}

resource "aws_ebs_encryption_by_default" "default" {
enabled = var.aws_ebs_encryption_by_default
}
6 changes: 6 additions & 0 deletions modules/avm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ variable "aws_config" {
description = "AWS Config settings"
}

variable "aws_ebs_encryption_by_default" {
type = bool
default = true
description = "Set to true to enable AWS Elastic Block Store encryption by default"
}

variable "create_account_password_policy" {
type = bool
default = true
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ variable "aws_deny_root_user_ous" {
description = "List of AWS Organisation OUs to apply the \"DenyRootUser\" SCP to"
}

variable "aws_ebs_encryption_by_default" {
type = bool
default = true
description = "Set to true to enable AWS Elastic Block Store encryption by default"
}

variable "aws_guardduty" {
type = bool
default = true
Expand Down

0 comments on commit 31c272e

Please sign in to comment.