Skip to main content

Module catalog

The shared modules under terraform/modules are the stable building blocks behind both environment roots.

Core modules

ModuleResponsibilityCritical inputsMain outputs
vpcVPC, public/private subnets, NAT, route tables, S3 gateway endpoint, shared security groups, flow logscidr_block, availability_zones, alb_ingress_cidrs, msk_public_access_cidrs, private_vpc_peering_routes, flow_logs_traffic_typevpc_id, public_subnet_ids, private_subnet_ids, security group IDs
albInternet-facing ALB, HTTPS listener, default target group, ALB access logs bucketvpc_id, subnet_ids, security_group_id, certificate_arn, health_check_path, target_group_deregistration_delay_secondsalb_arn, alb_dns_name, target_group_arn, listener_arn
ecrApplication image repositories and lifecycle policyrepository_name, image_tag_mutabilityrepository_url, repository_arn
secretsSecrets Manager secrets seeded from a JSON templatesecret_name_prefix, secret_name, secret_templatesecret_arn, secret_name
environment-operationsDedicated start, stop, and Kafka cleanup Lambdas, plus test-only DevOps Agent investigation wiring, with EventBridge Scheduler wiring only for start/stop and an explicit schedule enable/disable toggleecs_cluster_name, ecs_service_desired_counts, rds_instance_identifiers, msk_cluster_arn, msk_cleanup_topic_name_prefixes, msk_cleanup_topics, schedules_enabled, alarm_investigation_*lambda_function_names, schedule_names
slack-alarm-deliveryDedicated Lambda subscription that reads CloudWatch alarm notifications from the Slack SNS topic and posts them to a Slack incoming webhookname_prefix, environment_name, sns_topic_arn, slack_webhook_url, log_retention_dayslambda_function_name
newrelic-aws-pull-integrationAWS IAM role plus New Relic linked-account and pull-based AWS service integrations for account-level observabilityenabled, name_prefix, newrelic_account_id, newrelic_trusted_account_id, linked_account_name, aws_regionsrole_arn, linked_account_id
newrelic-aws-ecs-service-dashboardNew Relic dashboard for one ECS service using AWS pull integration samples from ComputeSample and LoadBalancerSampleenabled, account_id, dashboard_name, cluster_name, service_name, target_group_name, apm_entity_guiddashboard_guid, dashboard_permalink
newrelic-aws-rds-dashboardNew Relic dashboard for the dashboard and Camunda RDS instances using DatastoreSample from the AWS pull integrationenabled, account_id, dashboard_name, db_instance_identifiersdashboard_guid, dashboard_permalink
newrelic-aws-msk-dashboardNew Relic dashboard for MSK cluster and broker metrics using AwsMskClusterSample and AwsMskBrokerSample from the AWS pull integrationenabled, account_id, dashboard_name, cluster_namedashboard_guid, dashboard_permalink
newrelic-clickhouse-cloud-dashboardNew Relic dashboard for ClickHouse Cloud metrics received from Prometheus remote writeenabled, account_id, name_prefix, prometheus_server_namedashboard_guid, dashboard_permalink
newrelic-ecs-container-sample-dashboardReusable New Relic dashboard for ECS services whose widgets are built from ContainerSample sidecar data plus APM entity metricsenabled, account_id, dashboard_name, page_name, environment_name, project_name, service_name, service_display_name, apm_entity_guiddashboard_guid, dashboard_permalink

Compute modules

ModuleResponsibilityCritical inputsMain outputs
ecs-events-ingestionShared ECS cluster, task definition, service, app log group, optional New Relic sidecar log group, IAM for the events APIcluster_name, container_insights_setting, service_name, ecr_image_url, task_cpu, task_memory, secret_arn, secret_keys, enable_newrelic_sidecar, newrelic_sidecar_image, target_group_arncluster_name, cluster_arn, service_name
ecs-dashboard-backendDashboard backend ECS task, service, target group, dedicated security group, shared ECS SG attachment, IAM for MSK, logscluster_arn, image, listener_arn, host_header, secret_arn, secret_keys, msk_cluster_arn, shared_ecs_security_group_id, target_group_deregistration_delay_secondsservice_name, security_group_id, target_group_arn, log_group_name
ecs-scoringScoring ECS task, internal-only service, dedicated security group, Service Connect client config, IAM for MSKcluster_arn, image, secret_arn, secret_keys, msk_cluster_arn, shared_ecs_security_group_id, additional_ingress_security_group_idsservice_name, security_group_id, log_group_name, internal_url
ecs-camundaCamunda ECS task, internal-only service, dedicated security group, Service Connect server config, runtime secret wiringcluster_arn, image, secret_arn, secret_keys, scoring_security_group_idservice_name, security_group_id, log_group_name
ecs-kafka-uiKafka UI ECS task, service, target group, listener rule, IAM, logscluster_arn, cluster_display_name, bootstrap_brokers, listener_arn, host_header, target_group_deregistration_delay_secondsservice_name, target_group_arn, log_group_name
ecs-clickhouse-prometheus-agentInternal ECS service that runs the official Prometheus image with an inline startup command to scrape ClickHouse Cloud and remote-write to New Relic without public ingresscluster_arn, image, vpc_id, subnet_ids, secret_arn, secret_keys, newrelic_region, prometheus_server_name, scrape_intervalservice_name, security_group_id, log_group_name

Data modules

ModuleResponsibilityCritical inputsMain outputs
mskAmazon MSK cluster with IAM + TLS, optional public broker access, and optional multi-VPC connectivitycluster_name, kafka_version, broker_instance_type, ebs_volume_size_gib, cloudwatch_enhanced_monitoring, enable_public_access, subnet_ids, security_group_idbootstrap_brokers_tls, bootstrap_brokers_public_tls, cluster_arn
msk-connect-s3Optional MSK Connect S3 sink connector, execution role, log group, custom pluginmsk_cluster_arn, bootstrap_brokers, topics_regex, s3_bucket_name, plugin_file_keyconnector_name, connector_arn, log_group_name
s3-sink-bucketGeneric encrypted S3 bucket with lifecycle policy for sink data or plugin artifactsbucket_name, expiration_daysbucket_name, bucket_arn
rds-postgresPostgreSQL instance, subnet groups, security group, parameter group, with either an RDS-managed master secret or a caller-supplied static master passwordidentifier, db_name, instance_class, subnet_group_type, allowed_cidr_blocks, application_security_group_ids, manage_master_user_password, master_passwordendpoint, port, db_name, security_group_id, master_user_secret_arn
elasticache-valkeyPrivate ElastiCache Valkey replication group, dedicated subnet group, and security group for backend cachingreplication_group_id, subnet_group_name, private_subnet_ids, allowed_security_group_ids, engine_version, node_type, number_of_replicasprimary_endpoint_address, reader_endpoint_address, port, security_group_id, subnet_group_name

How to pick the right layer

  • Read the root main.tf files when you need to understand orchestration between modules.
  • Read the individual module files when you need the implementation details or exact variable semantics.
  • Use the root outputs.tf files for operator workflows instead of reconstructing resource names manually.