Skip to content

Commit

Permalink
Merge pull request #311 from binbashar/feature/aws-config-aggregator
Browse files Browse the repository at this point in the history
Add AWS Config aggregator into the Security account
  • Loading branch information
lgallard authored Oct 1, 2021
2 parents fba849c + 9b0eac6 commit b37aded
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 102 deletions.
4 changes: 2 additions & 2 deletions root/organizations/policies_scp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ resource "aws_organizations_policy" "delete_protection" {
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:ResourceTag/ProtectFromDeletion": [
"aws:ResourceTag/protectFromDeletion": [
"true"
]
}
Expand Down Expand Up @@ -183,7 +183,7 @@ resource "aws_organizations_policy" "tag_protection" {
},
"ForAnyValue:StringEquals": {
"aws:TagKeys": [
"ProtectFromDeletion"
"protectFromDeletion"
]
}
}
Expand Down
84 changes: 0 additions & 84 deletions root/security-compliance --/awsconfig.tf

This file was deleted.

14 changes: 0 additions & 14 deletions root/security-compliance --/outputs.tf

This file was deleted.

5 changes: 5 additions & 0 deletions root/security-compliance/awsconfig_delegation.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "null_resource" "config_delegation" {
provisioner "local-exec" {
command = "aws organizations register-delegated-administrator --account-id ${var.security_account_id} --service-principal config.amazonaws.com --profile ${var.profile} --region ${var.region}"
}
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion security/firewall-manager/fms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module "fms" {
remediation_enabled = true
resource_type_list = ["AWS::ElasticLoadBalancingV2::LoadBalancer", "AWS::ApiGateway::Stage"]
resource_type = null
resource_tags = { "fms" = "True" }
resource_tags = { "firewallManager" = "true" }
include_account_ids = { accounts = [var.network_account_id, var.security_account_id] }
exclude_account_ids = {}
logging_configuration = null
Expand Down
3 changes: 2 additions & 1 deletion security/security-compliance/awsconfig.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ module "terraform-aws-config" {
config_delivery_frequency = "Six_Hours"

# Aggregate data from all organization accounts on this account
aggregate_organization = false
config_aggregator_name = "${var.project}-${var.environment}-awsconfig-aggregator"
aggregate_organization = true

# IAM Config Rules w/ password policy check
check_root_account_mfa_enabled = true
Expand Down

0 comments on commit b37aded

Please sign in to comment.