Terraform module to manage baseline configuration for AWS accounts.
module "account_baseline" {
source = "github.com/schubergphilis/terraform-aws-mcaf-account-baseline?ref=VERSION"
}By default, this module enables all non-default EU regions (eu-central-2, eu-south-1, eu-south-2). To actually use these regions, they must also be included in the allowed regions SCP of the
mcaf-landing-zone module.
This module ensures that you can use all EU regions out of the box. If you intend to allow a region across your entire organization, the recommended approach is to also configure it as a governed region via AWS Control Tower. This ensures consistent enforcement of security, compliance, and operational guardrails.
If you would like to authorise other accounts to aggregate AWS Config data, account IDs and regions can be passed to var.aws_config using the attributes aggregator_account_ids and aggregator_regions respectively.
Note Control Tower already authorizes the
auditaccount to aggregate Config data from all other accounts in the organization, so there is no need to specify theauditaccount ID in theaggregator_account_idslist.
Example:
aws_config = {
aggregator_account_ids = ["123456789012"]
aggregator_regions = ["eu-west-1"]
}This module can deploy the IAM role required by the MCAF Service Quotas Manager module. The assuming_principal_identifier should be the ServiceQuotasManagerExecutionRole. This is by default arn:aws:iam::<account_id>:role/ServiceQuotasManagerExecutionRole-<region_name>.
Note
The Service Quotas Manager module should be deployed first before deploying this integration. Only existing IAM roles can be referenced as principals.
| Name | Version |
|---|---|
| terraform | >= 1.7.0 |
| aws | >= 6.7.0 |
| Name | Version |
|---|---|
| aws | >= 6.7.0 |
| Name | Source | Version |
|---|---|---|
| regional_resources_baseline | ./modules/regional-resources-baseline | n/a |
| service_quota_manager_role | schubergphilis/mcaf-role/aws | ~> 0.5.3 |
| Name | Type |
|---|---|
| aws_account_region.default | resource |
| aws_config_aggregate_authorization.default | resource |
| aws_ec2_image_block_public_access.default | resource |
| aws_iam_account_password_policy.default | resource |
| aws_s3_account_public_access_block.default | resource |
| aws_region.current | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| account_password_policy | AWS account password policy parameters | object({ |
{ |
no |
| aws_config | AWS Config settings | object({ |
null |
no |
| aws_ebs_encryption_by_default | Set to true to enable AWS Elastic Block Store encryption by default | bool |
true |
no |
| aws_ebs_encryption_custom_key | Set to true and specify the aws_kms_key_arns to use in place of the AWS-managed default CMK |
bool |
false |
no |
| aws_ebs_snapshot_block_public_access_state | Configure regionally the EBS snapshot public sharing policy, alternatives: block-all-sharing and unblocked |
string |
"block-new-sharing" |
no |
| aws_ec2_image_block_public_access_state | Configure blocking new AMIs from being publicly shared, alternatives: unblocked |
string |
"block-new-sharing" |
no |
| aws_kms_key_arns | Map of region name => KMS Key ARN to use for EBS default encryption (and optionally other resources). Safely attaches/creates KMS resources only when a key for the region exists. | map(string) |
{} |
no |
| aws_s3_public_access_block_config | S3 bucket-level Public Access Block config | object({ |
{} |
no |
| aws_ssm_automation_log_group_name | CloudWatch Logs log group name for SSM Automation. | string |
"/aws/ssm/automation" |
no |
| aws_ssm_automation_logging_enabled | When true, enable SSM Automation customer-script logging to CloudWatch Logs in each baseline region. | bool |
true |
no |
| aws_ssm_documents_public_sharing_permission | Configure the SSM documents public sharing policy, alternatives: Enable |
string |
"Disable" |
no |
| enable_additional_eu_regions | Enable all additional EU AWS Regions beyond the default ones | bool |
true |
no |
| extra_regions_to_baseline | List of additional regions to apply the baseline, defaults to us-east-1 | list(string) |
[ |
no |
| service_quotas_manager_role | Create the role needed to integrate the terraform-aws-mcaf-service-quotas-manager module | object({ |
null |
no |
| tags | Map of tags | map(string) |
{} |
no |
No outputs.