Skip to content

The Terraform SonarQube module enables easy deployment of SonarQube using Helm on AWS, Azure, or GCP, providing comprehensive code quality and security analysis across cloud platforms.

License

Notifications You must be signed in to change notification settings

squareops/terraform-kubernetes-sonarqube

Repository files navigation

Sonarqube

squareops_avatar

SquareOps Technologies Your DevOps Partner for Accelerating cloud journey.


The module deploys a Sonarqube instance on a Kubernetes cluster. Sonarqube is an open-source tool that provides continuous code quality management to perform automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities. This module uses Kubernetes manifests to deploy Sonarqube along with a PostgreSQL database. It allows for easy configuration of the Sonarqube instance through the use of Terraform variables.

Supported Versions:

Sonarqube Helm Chart Version K8s supported version (EKS, AKS & GKE)
1.0.30 1.23,1.24,1.25,1.26,1.27,1.28,1.29,1.30

Usage Example

module "sonarqube" {
    source           = "squareops/sonarqube/kubernetes"
    version          = "3.0.1"
  sonarqube_config = {
    hostname                       = "sonarqube.squareops.in"
    values_yaml                    = file("./helm/values.yaml")
    storage_class_name             = "gp2"
    sonarqube_volume_size          = "5Gi"
    postgresql_volume_size         = "20Gi"
    grafana_monitoring_enabled     = false
    postgresql_password_external   = ""
    postgresql_external_server_url = ""
  }
}

IAM Permissions

The required IAM permissions to create resources from this module can be found here

Important Notes

  1. In order to enable the exporter, it is required to deploy Prometheus/Grafana first.
  2. The exporter is a tool that extracts metrics data from an application or system and makes it available to be scraped by Prometheus.
  3. Prometheus is a monitoring system that collects metrics data from various sources, including exporters, and stores it in a time-series database.
  4. Grafana is a data visualization and dashboard tool that works with Prometheus and other data sources to display the collected metrics in a user-friendly way.
  5. To deploy Prometheus/Grafana, please follow the installation instructions for each tool in their respective documentation.
  6. Once Prometheus and Grafana are deployed, the exporter can be configured to scrape metrics data from your application or system and send it to Prometheus.
  7. Finally, you can use Grafana to create custom dashboards and visualize the metrics data collected by Prometheus.
  8. This module is compatible with EKS, AKS & GKE which is great news for users deploying the module on an AWS, Azure & GCP cloud. Review the module's documentation, meet specific configuration requirements, and test thoroughly after deployment to ensure everything works as expected.

Requirements

No requirements.

Providers

Name Version
helm n/a
kubernetes n/a
random n/a

Modules

No modules.

Resources

Name Type
helm_release.sonarqube resource
kubernetes_namespace.sonarqube resource
random_password.postgresql_password resource
random_password.sonarqube_password resource

Inputs

Name Description Type Default Required
chart_version Version of the Jenkins chart that will be used to deploy Jenkins application. string "10.6.1" no
namespace Name of the Kubernetes namespace where the Jenkins deployment will be deployed. string "sonarqube" no
sonarqube_config Specify the configuration settings for Sonarqube, including the hostname, storage options, and custom YAML values. any
{
"grafana_monitoring_enabled": false,
"hostname": "",
"postgresql_external_server_url": "",
"postgresql_password_external": "",
"postgresql_volume_size": "",
"sonarqube_volume_size": "",
"storage_class_name": "",
"values_yaml": ""
}
no

Outputs

Name Description
sonarqube Sonarqube Credentials
sonarqube_postgresql_password Password for the PostgreSQL database deployed with SonarQube
sonarqube_postgresql_username Username for the PostgreSQL database deployed with SonarQube

Contribution & Issue Reporting

To report an issue with a project:

  1. Check the repository's issue tracker on GitHub
  2. Search to see if the issue has already been reported
  3. If you can't find an answer to your question in the documentation or issue tracker, you can ask a question by creating a new issue. Be sure to provide enough context and details so others can understand your problem.

License

Apache License, Version 2.0, January 2004 (http://www.apache.org/licenses/).

Support Us

To support a GitHub project by liking it, you can follow these steps:

  1. Visit the repository: Navigate to the GitHub repository.

  2. Click the "Star" button: On the repository page, you'll see a "Star" button in the upper right corner. Clicking on it will star the repository, indicating your support for the project.

  3. Optionally, you can also leave a comment on the repository or open an issue to give feedback or suggest changes.

Starring a repository on GitHub is a simple way to show your support and appreciation for the project. It also helps to increase the visibility of the project and make it more discoverable to others.

Who we are

We believe that the key to success in the digital age is the ability to deliver value quickly and reliably. That’s why we offer a comprehensive range of DevOps & Cloud services designed to help your organization optimize its systems & Processes for speed and agility.

  1. We are an AWS Advanced consulting partner which reflects our deep expertise in AWS Cloud and helping 100+ clients over the last 5 years.
  2. Expertise in Kubernetes and overall container solution helps companies expedite their journey by 10X.
  3. Infrastructure Automation is a key component to the success of our Clients and our Expertise helps deliver the same in the shortest time.
  4. DevSecOps as a service to implement security within the overall DevOps process and helping companies deploy securely and at speed.
  5. Platform engineering which supports scalable,Cost efficient infrastructure that supports rapid development, testing, and deployment.
  6. 24*7 SRE service to help you Monitor the state of your infrastructure and eradicate any issue within the SLA.

We provide support on all of our projects, no matter how small or large they may be.

To find more information about our company, visit squareops.com, follow us on Linkedin, or fill out a job application. If you have any questions or would like assistance with your cloud strategy and implementation, please don't hesitate to contact us.

About

The Terraform SonarQube module enables easy deployment of SonarQube using Helm on AWS, Azure, or GCP, providing comprehensive code quality and security analysis across cloud platforms.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages