feedzai / terraform-aws-sorry-cypress

A Terraform module for deploying sorry-cypress on AWS ECS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Sorry Cypress Terraform Module

Terraform module that deploys Sorry Cypress on AWS.

Usage

module "sorry_cypress" {
    source = "terraform-aws-sorry-cypress"

    s3_bucket_name = "sorry_cypress_test_results"
    zone_id = "example.com"
    url = "sorrycypress.example.com"
    load_balancer_security_group = "sg-123456789"
    vpc_id = "vpc-123456"
    task_role_arn = "arn::iam::role"
    execution_role_arn = "arn::iam::role"
    subnets = {
        private = []
        public = []
    }
    alb_logs_bucket = "alb_logs_bucket"
    certificate_arn = "arn::acm::..."
    docker_registry_credentials = "secret-name-in-secrets-manager"
}

Requirements

Name Version
aws ~> 4.12.1

Providers

Name Version
aws ~> 4.12.1

Modules

No modules.

Resources

Name Type
aws_cloudwatch_log_group.sorry_cypress_log_group resource
aws_ecs_cluster.sorry_cypress resource
aws_ecs_service.sorry_cypress_ecs_service resource
aws_ecs_task_definition.sorry_cypress resource
aws_lb.sorry_cypress resource
aws_lb_listener.dashboard_listener resource
aws_lb_listener.director_listener resource
aws_lb_listener.http resource
aws_lb_listener.https resource
aws_lb_listener_rule.api_listener_rule resource
aws_lb_listener_rule.https_api resource
aws_lb_target_group.sorry_cypress_api resource
aws_lb_target_group.sorry_cypress_dashboard resource
aws_lb_target_group.sorry_cypress_director resource
aws_route53_record.sorry_cypress resource
aws_s3_bucket.test_results_bucket resource
aws_s3_bucket_acl.test_results_acl resource
aws_s3_bucket_cors_configuration.test_results_bucket_cors resource
aws_s3_bucket_lifecycle_configuration.tests_retention_policy resource
aws_s3_bucket_policy.allow_access_from_prefix_list resource
aws_s3_bucket_public_access_block.sorry_cypress resource
aws_security_group.sorry_cypress_alb resource
aws_security_group.sorry_cypress_fargate resource
aws_security_group_rule.allow_http_director resource
aws_security_group_rule.allow_http_from_alb resource
aws_security_group_rule.allow_https_alb resource
aws_security_group_rule.allow_https_api resource
aws_security_group_rule.allow_https_dashboard resource
aws_security_group_rule.allow_https_director resource
aws_security_group_rule.allow_inbound_containers resource
aws_security_group_rule.allow_outbound resource
aws_security_group_rule.allow_outbound_fargate resource
aws_ec2_managed_prefix_list.prefix_list data source
aws_iam_policy_document.allow_access_from_prefix_list data source

Inputs

Name Description Type Default Required
alb_logs_bucket An S3 bucket to store ALB access logs string n/a yes
certificate_arn n/a string n/a yes
cpu_request Number of cpu units used by the task string "1024" no
docker_registry The docker registry to pull sorry cypress images from string n/a yes
docker_registry_credentials The ARN of the docker registry credentials secret in SecretsManager string n/a yes
execution_role_arn ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume string n/a yes
load_balancer_security_group The load balancer security group
object({
id = string
})
n/a yes
memory_request Amount (in MiB) of memory used by the task string "2048" no
prefix_list An EC2 managed prefix list string n/a yes
s3_bucket_name S3 bucket name to store test results string n/a yes
subnets AWS subnet IDs to deploy Sorry Cypress
object({
private = list(string),
public = list(string)
})
n/a yes
task_role_arn ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services string n/a yes
test_results_retention The number of days to keep test results number 15 no
url The URL to deploy SorryCypress to string n/a yes
vpc_id The VPC ID string n/a yes
zone_id The route53 zone id string n/a yes

Outputs

Name Description
api_url The Sorry Cypress API endpoint
dashboard_url The Sorry Cypress dashboard URL
director_url The Sorry Cypress director URL
test_results_bucket The S3 bucket where test results are stored

References

This modules was based on the CloudFormation template provided by SorryCypress

About

A Terraform module for deploying sorry-cypress on AWS ECS

License:Apache License 2.0


Languages

Language:HCL 100.0%