Skip to content

Terraform README

Requirements

Name Version
terraform >= 1.5.0
local ~> 2.5

Providers

Name Version
local 2.8.0

Modules

No modules.

Resources

Name Type
local_file.app_config resource
local_file.auto_scaling_group resource
local_file.backup_compliance_report resource
local_file.backup_plan_daily resource
local_file.backup_plan_monthly resource
local_file.backup_plan_weekly resource
local_file.backup_selection resource
local_file.backup_summary_md resource
local_file.backup_vault_dr resource
local_file.backup_vault_primary resource
local_file.cloudtrail resource
local_file.cloudtrail_s3_bucket resource
local_file.cloudwatch_log_groups resource
local_file.compute_summary_md resource
local_file.db_parameter_group resource
local_file.db_security_group resource
local_file.db_subnet_group resource
local_file.deployment_manifest resource
local_file.dns_records resource
local_file.iam_app_policy resource
local_file.iam_app_role resource
local_file.iam_cicd_role resource
local_file.iam_summary_md resource
local_file.kms_key resource
local_file.kms_summary_md resource
local_file.launch_template resource
local_file.logging_summary_md resource
local_file.monitoring_alarms resource
local_file.monitoring_dashboard resource
local_file.monitoring_log_groups resource
local_file.monitoring_summary_md resource
local_file.network_security_rules resource
local_file.network_summary_md resource
local_file.network_topology resource
local_file.rds_alarms resource
local_file.rds_instance resource
local_file.rds_read_replica resource
local_file.rds_summary_md resource
local_file.secrets_manager resource
local_file.security_alarms resource
local_file.security_group_app resource
local_file.ssm_parameters resource
local_file.storage_backup_bucket resource
local_file.storage_logs_bucket resource
local_file.storage_primary_bucket resource
local_file.storage_summary_md resource
local_file.waf_admin_ip_set resource
local_file.waf_summary_md resource
local_file.waf_web_acl resource

Inputs

Name Description Type Default Required
ami_id Amazon Machine Image ID for the application tier (pin to a hardened AMI in production). string "ami-0123456789abcdef0" no
app_name Name of the application being deployed. string n/a yes
availability_zones Availability zones to spread subnets across. list(string)
[
"az-1",
"az-2"
]
no
cloudwatch_retention_days CloudWatch log group retention in days. Must be > 0 (DORA-ICT-001 requirement). number 90 no
cost_center Financial cost-center code used for FinOps reporting (FinOps cost-allocation tag). string n/a yes
desired_capacity Desired number of instances in the Auto Scaling group at steady state. number 2 no
dns_zone Internal DNS zone name used for service discovery records. string "internal.example.com" no
enable_backups Whether to enable automated backups for the application data volume. bool true no
enable_cloudtrail Enable CloudTrail with log file validation (DORA Art.9/10 requirement). bool true no
enable_dns_support Enable DNS resolution and DNS hostnames for the virtual network. bool true no
enable_nat_gateway When true, provision a NAT gateway in each public subnet so private subnets can reach the internet for egress. bool true no
environment Deployment environment (dev | staging | prod). string "dev" no
instance_type EC2 instance type for application tier launch template. string "t3.medium" no
max_size Maximum number of instances in the Auto Scaling group. number 4 no
min_size Minimum number of instances in the Auto Scaling group. number 1 no
owner Team or individual responsible for this resource (FinOps cost-allocation tag). string n/a yes
private_subnet_cidrs List of CIDR blocks for private subnets (no direct internet route; egress via NAT gateway). list(string)
[
"10.0.1.0/24",
"10.0.2.0/24"
]
no
public_subnet_cidrs List of CIDR blocks for public subnets (internet-gateway attached; hosts load balancers and NAT gateways only). list(string)
[
"10.0.10.0/24",
"10.0.11.0/24"
]
no
replica_count Number of application replicas to provision. number 1 no
vpc_cidr Primary CIDR block for the virtual network / VPC. string "10.0.0.0/16" no

Outputs

Name Description
app_config_path Filesystem path to the generated application configuration file.
auto_scaling_group_path Filesystem path to the generated Auto Scaling group JSON manifest.
backup_rpo_hours Documented RPO target in hours (DORA Art.12).
backup_rto_hours Documented RTO target in hours (DORA Art.12).
backup_vault_dr_path Filesystem path to the generated DR backup vault JSON manifest.
backup_vault_primary_path Filesystem path to the generated primary backup vault JSON manifest.
cloudtrail_path Filesystem path to the generated CloudTrail JSON manifest.
cloudwatch_log_groups_path Filesystem path to the generated CloudWatch log groups JSON manifest.
cloudwatch_retention_days Effective CloudWatch log group retention period in days.
dns_records_path Filesystem path to the generated DNS records JSON manifest.
iam_app_role_path Filesystem path to the generated IAM application role JSON manifest.
iam_cicd_role_path Filesystem path to the generated IAM CI/CD role JSON manifest.
kms_key_alias KMS key alias used for encryption across all resources in this module.
kms_key_path Filesystem path to the generated KMS key JSON manifest.
launch_template_path Filesystem path to the generated EC2 launch template JSON manifest.
manifest_path Filesystem path to the generated deployment manifest.
monitoring_alarms_path Filesystem path to the generated CloudWatch alarms JSON manifest.
monitoring_dashboard_path Filesystem path to the generated operations dashboard JSON manifest.
network_security_rules_path Filesystem path to the generated network security group rules JSON manifest.
network_topology_path Filesystem path to the generated network topology JSON manifest.
private_subnets Map of private subnet names to their CIDR blocks and metadata.
public_subnets Map of public subnet names to their CIDR blocks and metadata.
secrets_manager_path Filesystem path to the generated Secrets Manager JSON manifest.
ssm_parameters_path Filesystem path to the generated SSM Parameter Store JSON manifest.
storage_logs_bucket_name Name of the S3 access-logs bucket.
storage_primary_bucket_name Name of the primary application data S3 bucket.
tags Map of cost-allocation tags applied to every resource in this module.
vpc_cidr CIDR block of the virtual network.
waf_rate_limit Maximum requests per 5-minute window per IP before WAF blocks the source.
waf_web_acl_path Filesystem path to the generated WAF Web ACL JSON manifest.