Skip to content

Terraform Module Docs

TeamCity

Requirements

Name Version
terraform >= 1.9
aws 5.89.0
random 3.5.1

Providers

Name Version
aws 5.89.0
random 3.5.1

Modules

No modules.

Resources

Name Type
aws_cloudwatch_log_group.teamcity_log_group resource
aws_db_subnet_group.teamcity_db_subnet_group resource
aws_ecs_cluster.teamcity_cluster resource
aws_ecs_service.teamcity resource
aws_ecs_task_definition.teamcity_task_definition resource
aws_efs_access_point.teamcity_efs_data_access_point resource
aws_efs_file_system.teamcity_efs_file_system resource
aws_efs_mount_target.teamcity_efs_mount_target resource
aws_iam_policy.teamcity_default_policy resource
aws_iam_role.teamcity_default_role resource
aws_iam_role.teamcity_task_execution_role resource
aws_lb.teamcity_external_lb resource
aws_lb_listener.teamcity_listener resource
aws_lb_target_group.teamcity_target_group resource
aws_rds_cluster.teamcity_db_cluster resource
aws_rds_cluster_instance.teamcity_db_cluster_instance resource
aws_s3_bucket.teamcity_alb_access_logs_bucket resource
aws_s3_bucket_lifecycle_configuration.access_logs_bucket_lifecycle_configuration resource
aws_s3_bucket_policy.alb_access_logs_bucket_policy resource
aws_s3_bucket_public_access_block.access_logs_bucket_public_block resource
aws_security_group.teamcity_alb_sg resource
aws_security_group.teamcity_db_sg resource
aws_security_group.teamcity_efs_sg resource
aws_security_group.teamcity_service_sg resource
aws_vpc_security_group_egress_rule.alb_outbound_service resource
aws_vpc_security_group_egress_rule.service_outbound_internet resource
aws_vpc_security_group_ingress_rule.service_db resource
aws_vpc_security_group_ingress_rule.service_efs resource
aws_vpc_security_group_ingress_rule.service_inbound_alb resource
random_string.teamcity_alb_access_logs_bucket_suffix resource
aws_ecs_cluster.teamcity_cluster data source
aws_efs_file_system.efs_file_system data source
aws_elb_service_account.main data source
aws_iam_policy_document.access_logs_bucket_alb_write data source
aws_iam_policy_document.ecs_tasks_trust_relationship data source
aws_iam_policy_document.teamcity_default_policy data source
aws_region.current data source

Inputs

Name Description Type Default Required
alb_certificate_arn The ARN of the SSL certificate to use for the ALB string null no
alb_subnets The subnets in which the ALB will be deployed list(string) [] no
aurora_instance_count Number of instances to provision for the Aurora cluster number 2 no
aurora_skip_final_snapshot Flag for whether a final snapshot should be created when the cluster is destroyed. bool true no
cluster_name The name of the ECS cluster to deploy TeamCity to. string null no
container_cpu The number of CPU units to allocate to the TeamCity server container number 1024 no
container_memory The number of MB of memory to allocate to the TeamCity server container number 4096 no
container_name The name of the TeamCity server container string "teamcity" no
container_port The port on which the TeamCity server container listens number 8111 no
create_external_alb Set this flag to true to create an external load balancer for TeamCity. bool true no
database_connection_string The database connection string for TeamCity string null no
database_master_password The master password for the database string null no
database_master_username The master username for the database string null no
debug Set this flag to enable ECS execute permissions on the TeamCity server container and force new service deployments on Terraform apply. bool false no
desired_container_count The desired number of containers running TeamCity server. number 1 no
efs_access_point_id The ID of the EFS access point to use for the TeamCity data volume. string null no
efs_encryption_enabled Set this flag to true to enable EFS encryption. bool true no
efs_id The ID of the EFS file system to use for the TeamCity service. string null no
enable_teamcity_alb_access_logs Enables access logging for the TeamCity ALB. Defaults to true. bool true no
enable_teamcity_alb_deletion_protection Enables deletion protection for the TeamCity ALB. Defaults to true. bool false no
environment The current environment (e.g. dev, prod, etc.) string "dev" no
name The name applied to resources in the TeamCity module string "teamcity" no
service_subnets The subnets in which the TeamCity server service will be deployed list(string) n/a yes
tags Tags to apply to resources. map(any)
{
"iac-management": "CGD-Toolkit",
"iac-module": "TeamCity",
"iac-provider": "Terraform"
}
no
teamcity_alb_access_logs_bucket ID of the S3 bucket for TeamCity ALB access log storage. If access logging is enabled and this is null the module creates a bucket. string null no
teamcity_alb_access_logs_prefix Log prefix for TeamCity ALB access logs. If null the project prefix and module name are used. string null no
teamcity_cloudwatch_log_retention_in_days The log retention in days of the cloudwatch log group for TeamCity. string 365 no
teamcity_efs_performance_mode The performance mode of the EFS file system used by the TeamCity service. Defaults to general purpose. string "generalPurpose" no
teamcity_efs_throughput_mode The throughput mode of the EFS file system used by the TeamCity service. Defaults to bursting. string "bursting" no
vpc_id The ID of the VPC in which the service will be deployed string n/a yes

Outputs

Name Description
external_alb_dns_name DNS endpoint of Application Load Balancer (ALB)
external_alb_zone_id Zone ID for internet facing load balancer