/terraform-aws-sonarqube

SonarQube Terraform Module for AWS

Primary LanguageHCLApache License 2.0Apache-2.0

SonarQube Terraform Module for AWS

This Terraform module deploys a SonarQube community server on AWS. Based on official Sonarqube Docker image https://hub.docker.com/_/sonarqube.

Usage

Check valid versions on:

Install pre commit hooks.

Pleas run this command right after cloning the repository.

    pre-commit install

For that you may need to install the folowwing tools:

In order to run all checks at any point run the following command:

    pre-commit run --all-files

Requirements

Name Version
terraform >= 0.13

Providers

Name Version
aws 3.50.0
random 3.1.0

Modules

Name Source Version
aws_cw_logs cn-terraform/cloudwatch-logs/aws 1.0.8
ecs_fargate cn-terraform/ecs-fargate/aws 2.0.28

Resources

Name Type
aws_db_subnet_group.aurora_db_subnet_group resource
aws_kms_key.encryption_key resource
aws_rds_cluster.aurora_db resource
aws_rds_cluster_instance.aurora_db_cluster_instances resource
aws_security_group.aurora_sg resource
random_password.master_password resource

Inputs

Name Description Type Default Required
availability_zones List of Availability Zones list(string) n/a yes
db_engine_version DB engine version string "11.7" no
db_instance_size DB instance size string "db.r4.large" no
db_name Default DB name string "sonar" no
db_password DB password string "" no
db_username Default DB username string "sonar" no
name_prefix Name prefix for resources on AWS string n/a yes
private_subnets_ids List of Private Subnets IDs list(string) n/a yes
public_subnets_ids List of Public Subnets IDs list(string) n/a yes
region AWS Region the infrastructure is hosted in string n/a yes
sonarqube_image Sonarqube image string "sonarqube:lts" no
tags Resource tags map(string) {} no
vpc_id ID of the VPC string n/a yes

Outputs

Name Description
sonar_lb_arn SonarQube Load Balancer ARN
sonar_lb_arn_suffix SonarQube Load Balancer ARN Suffix
sonar_lb_dns_name SonarQube Load Balancer DNS Name
sonar_lb_id SonarQube Load Balancer ID
sonar_lb_zone_id SonarQube Load Balancer Zone ID