This module helps you create Gitlab ECS task service and the related task role, assuming that:
export AWS_ACCESS_KEY_ID="anaccesskey"
export AWS_SECRET_ACCESS_KEY="asecretkey"
export AWS_DEFAULT_REGION="us-west-1"
terraform init
terraform apply
You can literally copy and paste the following example, change the following attributes, and you're ready to go:
gitlab_domain
: application domain nameprefix
: Prefix for resource namesaws_ecs_cluster_id
: Arn of your ECS clustervpc_id
: ID of your VPCsubnets
: A list of subnets' IDs in the VPC. Minimum 2 subnets should be givencertificate_self_signed
: Self signed certificate can be generated. Boolean. If false certificate_arn
should be setcertificate_arn
: Arn of your SSL certificate. Should be set if certificate_self_signed is falsegitlab_root_password
: initially created password for the root usergitlab_web_endpoint
: GitLab URL# include this module and enter the values of input variables
module "ecs-gitlab" {
source = "riboseinc/ecs-gitlab/aws"
gitlab_domain = "gitlab.example.com"
prefix = "ribose"
aws_ecs_cluster_id = "arn:..."
vpc_id = "vpc-1234567"
subnets = ["subnet-1234567","subnet-7654321"]
certificate_arn = "arn:..."
}
output "Root_Password" {
value = module.ecs-gitlab.gitlab_root_password
}
output "Gitlab_Address" {
value = module.ecs-gitlab.gitlab_web_endpoint
}