Skip to content

Terraform Module Docs

Perforce Helix Swarm

Requirements

Name Version
terraform >= 1.0
aws 5.68.0
random 3.6.3

Providers

Name Version
aws 5.59.0
random 3.6.2

Modules

No modules.

Resources

Name Type
aws_cloudwatch_log_group.helix_swarm_redis_service_log_group resource
aws_cloudwatch_log_group.helix_swarm_service_log_group resource
aws_ecs_cluster.helix_swarm_cluster resource
aws_ecs_cluster_capacity_providers.helix_swarm_cluster_fargate_providers resource
aws_ecs_service.helix_swarm_service resource
aws_ecs_task_definition.helix_swarm_task_definition resource
aws_elasticache_cluster.swarm resource
aws_elasticache_subnet_group.swarm resource
aws_iam_policy.helix_swarm_default_policy resource
aws_iam_policy.helix_swarm_ssm_policy resource
aws_iam_role.helix_swarm_default_role resource
aws_iam_role.helix_swarm_task_execution_role resource
aws_lb.helix_swarm_alb resource
aws_lb_listener.swarm_alb_https_listener resource
aws_lb_target_group.helix_swarm_alb_target_group resource
aws_s3_bucket.helix_swarm_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.helix_swarm_alb_sg resource
aws_security_group.helix_swarm_elasticache_sg resource
aws_security_group.helix_swarm_service_sg resource
aws_vpc_security_group_egress_rule.helix_swarm_alb_outbound_service resource
aws_vpc_security_group_egress_rule.helix_swarm_service_outbound_ipv4 resource
aws_vpc_security_group_egress_rule.helix_swarm_service_outbound_ipv6 resource
aws_vpc_security_group_ingress_rule.helix_swarm_elasticache_ingress resource
aws_vpc_security_group_ingress_rule.helix_swarm_service_inbound_alb resource
random_string.helix_swarm resource
random_string.helix_swarm_alb_access_logs_bucket_suffix resource
aws_ecs_cluster.helix_swarm_cluster 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.helix_swarm_default_policy data source
aws_iam_policy_document.helix_swarm_ssm_policy data source
aws_region.current data source

Inputs

Name Description Type Default Required
certificate_arn The TLS certificate ARN for the Helix Swarm service load balancer. string n/a yes
cluster_name The name of the cluster to deploy the Helix Swarm service into. Defaults to null and a cluster will be created. string null no
create_helix_swarm_default_policy Optional creation of Helix Swarm default IAM Policy. Default is set to true. bool true no
create_helix_swarm_default_role Optional creation of Helix Swarm Default IAM Role. Default is set to true. bool true no
custom_helix_swarm_role ARN of the custom IAM Role you wish to use with Helix Swarm. string null no
debug Debug flag to enable execute command on service for container access. bool false no
elasticache_node_count Number of cache nodes to provision in the Elasticache cluster. number 1 no
elasticache_node_type The type of nodes provisioned in the Elasticache cluster. string "cache.t4g.micro" no
enable_helix_swarm_alb_access_logs Enables access logging for the Helix Swarm ALB. Defaults to true. bool true no
enable_helix_swarm_alb_deletion_protection Enables deletion protection for the Helix Swarm ALB. Defaults to true. bool true no
enable_sso Set this to true if using SSO for Helix Swarm authentication. bool false no
environment The current environment (e.g. dev, prod, etc.) string "dev" no
existing_redis_connection The connection specifications to use for an existing Redis deployment.
object({
host = string
port = number
})
null no
existing_security_groups A list of existing security group IDs to attach to the Helix Swarm service load balancer. list(string) [] no
fully_qualified_domain_name The fully qualified domain name that Swarm should use for internal URLs. string null no
helix_swarm_alb_access_logs_bucket ID of the S3 bucket for Helix Swarm ALB access log storage. If access logging is enabled and this is null the module creates a bucket. string null no
helix_swarm_alb_access_logs_prefix Log prefix for Helix Swarm ALB access logs. If null the project prefix and module name are used. string null no
helix_swarm_alb_subnets A list of subnets to deploy the Helix Swarm load balancer into. Public subnets are recommended. list(string) n/a yes
helix_swarm_cloudwatch_log_retention_in_days The log retention in days of the cloudwatch log group for Helix Swarm. string 365 no
helix_swarm_container_cpu The CPU allotment for the swarm container. number 1024 no
helix_swarm_container_memory The memory allotment for the swarm container. number 2048 no
helix_swarm_container_name The name of the swarm container. string "helix-swarm-container" no
helix_swarm_container_port The container port that swarm runs on. number 80 no
helix_swarm_desired_container_count The desired number of containers running the Helix Swarm service. number 1 no
helix_swarm_service_subnets A list of subnets to deploy the Helix Swarm service into. Private subnets are recommended. list(string) n/a yes
internal Set this flag to true if you do not want the Helix Swarm service load balancer to have a public IP. bool false no
name The name attached to swarm module resources. string "swarm" no
p4d_port The P4D_PORT environment variable where Swarm should look for Helix Core. Defaults to 'ssl:perforce:1666' string "ssl:perforce:1666" no
p4d_super_user_arn The ARN of the parameter or secret where the p4d super user username is stored. string n/a yes
p4d_super_user_password_arn The ARN of the parameter or secret where the p4d super user password is stored. string n/a yes
p4d_swarm_password_arn The ARN of the parameter or secret where the swarm user password is stored. string n/a yes
p4d_swarm_user_arn The ARN of the parameter or secret where the swarm user username is stored. string n/a yes
project_prefix The project prefix for this workload. This is appeneded to the beginning of most resource names. string "cgd" no
tags Tags to apply to resources. map(any)
{
"IAC_MANAGEMENT": "CGD-Toolkit",
"IAC_MODULE": "swarm",
"IAC_PROVIDER": "Terraform"
}
no
vpc_id The ID of the existing VPC you would like to deploy swarm into. string n/a yes

Outputs

Name Description
alb_dns_name The DNS name of the Swarm ALB
alb_security_group_id Security group associated with the swarm load balancer
alb_zone_id The hosted zone ID of the Swarm ALB
cluster_name Name of the ECS cluster hosting Swarm
service_security_group_id Security group associated with the ECS service running swarm