Giter Site home page Giter Site logo

cn-terraform / terraform-aws-sonarqube Goto Github PK

View Code? Open in Web Editor NEW
37.0 3.0 43.0 136 KB

SonarQube Terraform Module for AWS

Home Page: https://registry.terraform.io/modules/cn-terraform/sonarqube

License: Apache License 2.0

HCL 100.00%
sonarqube sonarqube-server terraform terraform-module cloud aws amazon-web-services

terraform-aws-sonarqube's People

Contributors

chitopunk avatar dchocoboo avatar dmitry1987 avatar idjemaoune avatar jainrounak6 avatar jnonino avatar ktibi avatar mfcaro avatar mhmdio avatar ovcharenko avatar pdehlke avatar renovate[bot] avatar zahorniak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

terraform-aws-sonarqube's Issues

Support of HTTPS

Hello !
It would nice (a requirement for us) if the load balancer would be spawned with https support.

cn-terraform/ecs-fargate seems to support it.

Cannot find version 11.5 for aurora-postgresql

Full error:

Error: error creating RDS cluster: InvalidParameterCombination: Cannot find version 11.5 for aurora-postgresql

When I view the Create Database page on the web console, there is an option for aurora-postgresql 11.4 and 11.6, but not 11.5.

aurora-postgresql-versions

Setup example

Hello, this module looks very nice. Great work!
Do you by any chance have an article/example/guide online showing how to set it up?

Default Postgresql variable version (11.7) doesn't work

│ Error: error creating RDS cluster: InvalidParameterCombination: Cannot find version 11.7 for aurora-postgresql
│ status code: 400, request id: xxx│
│ with module.sonarqube.aws_rds_cluster.aurora_db,
│ on .terraform/modules/sonarqube/database.tf line 29, in resource "aws_rds_cluster" "aurora_db":
│ 29: resource "aws_rds_cluster" "aurora_db" {

dependency errors on plan / apply

Reopening #10
Am getting the same error during a plan or apply
What is the dependency order, and can the README be updated to include it?

terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


Warning: Interpolation-only expressions are deprecated

on .terraform/modules/sonar.ecs_fargate/main.tf line 9, in module "ecs-cluster":
9: name = "${var.name_prefix}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and one more similar warning elsewhere)

Error: Invalid for_each argument

on .terraform/modules/sonar.ecs_fargate.ecs-fargate-service/main.tf line 10, in data "aws_lb_target_group" "lb_http_target_groups":
10: for_each = var.lb_http_tgs_arns != null ? toset(var.lb_http_tgs_arns) : toset([])

The "for_each" value depends on resource attributes that cannot be determined
until apply, so Terraform cannot predict how many instances will be created.
To work around this, use the -target argument to first apply only the
resources that the for_each depends on.

Error: Invalid for_each argument

on .terraform/modules/sonar.ecs_fargate.ecs-fargate-service/main.tf line 20, in data "aws_lb_listener" "lb_http_listeners":
20: for_each = var.lb_http_listeners_arns != null ? toset(var.lb_http_listeners_arns) : toset([])

The "for_each" value depends on resource attributes that cannot be determined
until apply, so Terraform cannot predict how many instances will be created.
To work around this, use the -target argument to first apply only the
resources that the for_each depends on.

Using:
terraform -version
Terraform v0.13.5

  • provider registry.terraform.io/hashicorp/aws v2.70.0
  • provider registry.terraform.io/hashicorp/local v1.4.0
  • provider registry.terraform.io/hashicorp/random v3.0.0

Error create S3 bucket - BucketAlreadyExists

Captura de Tela_Área de Seleção_20220518115140

Hi, I'm trying to run the project, but in the final steps an error occurs when creating the s3 bucket. Would it be possible to change the name of this bucket or pass an argument with another name? I'm attaching a print with the error.

Dependency errors when I run 'terraform plan'

I get the below error when I run terraform plan. how do I resolve it.

sonarqube % terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


Warning: Value for undeclared variable

The root module does not declare a variable named "availability_zones" but a
value was found in file "terraform.tfvars". To use this value, add a
"variable" block to the configuration.

Using a variables file to set an undeclared variable is deprecated and will
become an error in a future release. If you wish to provide certain "global"
settings to all configurations in your organization, use TF_VAR_...
environment variables to set these instead.

Warning: Interpolation-only expressions are deprecated

on .terraform/modules/sonarqube.ecs_fargate/main.tf line 9, in module "ecs-cluster":
9: name = "${var.name_prefix}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and one more similar warning elsewhere)

Error: Invalid for_each argument

on .terraform/modules/sonarqube.ecs_fargate.ecs-fargate-service/main.tf line 10, in data "aws_lb_target_group" "lb_http_target_groups":
10: for_each = var.lb_http_tgs_arns != null ? toset(var.lb_http_tgs_arns) : toset([])

The "for_each" value depends on resource attributes that cannot be determined
until apply, so Terraform cannot predict how many instances will be created.
To work around this, use the -target argument to first apply only the
resources that the for_each depends on.

Error: Invalid for_each argument

on .terraform/modules/sonarqube.ecs_fargate.ecs-fargate-service/main.tf line 20, in data "aws_lb_listener" "lb_http_listeners":
20: for_each = var.lb_http_listeners_arns != null ? toset(var.lb_http_listeners_arns) : toset([])

The "for_each" value depends on resource attributes that cannot be determined
until apply, so Terraform cannot predict how many instances will be created.
To work around this, use the -target argument to first apply only the
resources that the for_each depends on.

volumes variable does not work

As written, volumes requires definitions for both a docker_volume_configuration and an efs_volume_configuration, but an aws_ecs_task_definition requires either a docker_volume_configuration or an efs_volume_configuration. It therefore seems that volumes can't actually be used in this module.

Port 9001 make tg-1 unhealthy

Port 9001 makes tg-1 unhealthy, so the ECS service keep restarting due to the health checks from the LB on port 9001, any idea? for now, I set the health check for that port to override with port 9000

support tags

Add a terraform variable to add tags to aws resources and submodules

Disable loadbalancing logs

Is it possible to edit main.tf so that loadbalancing logs are not enabled? It is enabled to save these logs to an S3 bucket.

InvalidParameterCombination: RDS does not support creating a DB instance with the following combination

Was prompt with the following TF error while using the default Aurora DB specs
DBInstanceClass=db.r4.large, Engine=aurora-postgresql, EngineVersion=14.4, LicenseModel=postgresql-license

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

module.sonarqube.aws_rds_cluster_instance.aurora_db_cluster_instances[1]: Creating...
module.sonarqube.aws_rds_cluster_instance.aurora_db_cluster_instances[0]: Creating...
module.sonarqube.aws_rds_cluster_instance.aurora_db_cluster_instances[2]: Creating...
╷
│ Error: creating RDS Cluster (sonar-sonar-aurora-db) Instance (sonar-aurora-db-instance-0): InvalidParameterCombination: RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.r4.large, Engine=aurora-postgresql, EngineVersion=14.4, LicenseModel=postgresql-license. For supported combinations of instance class and database engine version, see the documentation.
│ 	status code: 400, request id: 562d74f1-3736-4bda-978d-a37cbc9dd2a4
│ 
│   with module.sonarqube.aws_rds_cluster_instance.aurora_db_cluster_instances[0],
│   on .terraform/modules/sonarqube/database.tf line 64, in resource "aws_rds_cluster_instance" "aurora_db_cluster_instances":
│   64: resource "aws_rds_cluster_instance" "aurora_db_cluster_instances" {
│ 
╵
╷
│ Error: creating RDS Cluster (sonar-sonar-aurora-db) Instance (sonar-aurora-db-instance-1): InvalidParameterCombination: RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.r4.large, Engine=aurora-postgresql, EngineVersion=14.4, LicenseModel=postgresql-license. For supported combinations of instance class and database engine version, see the documentation.
│ 	status code: 400, request id: 9a81c2bc-a08b-4b99-80db-759569894c56
│ 
│   with module.sonarqube.aws_rds_cluster_instance.aurora_db_cluster_instances[1],
│   on .terraform/modules/sonarqube/database.tf line 64, in resource "aws_rds_cluster_instance" "aurora_db_cluster_instances":
│   64: resource "aws_rds_cluster_instance" "aurora_db_cluster_instances" {
│ 
╵
╷
│ Error: creating RDS Cluster (sonar-sonar-aurora-db) Instance (sonar-aurora-db-instance-2): InvalidParameterCombination: RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.r4.large, Engine=aurora-postgresql, EngineVersion=14.4, LicenseModel=postgresql-license. For supported combinations of instance class and database engine version, see the documentation.
│ 	status code: 400, request id: 43b2e1d9-daa0-4388-a871-45ba8d6ee40a
│ 
│   with module.sonarqube.aws_rds_cluster_instance.aurora_db_cluster_instances[2],
│   on .terraform/modules/sonarqube/database.tf line 64, in resource "aws_rds_cluster_instance" "aurora_db_cluster_instances":
│   64: resource "aws_rds_cluster_instance" "aurora_db_cluster_instances" {

Elasticsearch can't start

Fixing for the error, Elasticsearch can't start


[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
--
 

update ecs fargate module by adding the following vars:

  command = [
    "-Dsonar.search.javaAdditionalOpts=-Dnode.store.allow_mmapfs=false"
  ]
  ulimits = [
    {
      "name" : "nofile",
      "softLimit" : 65535,
      "hardLimit" : 65535
    }
  ]

Error creating load balancer

module.sonarqube.module.ecs_fargate.module.ecs-fargate-service.aws_security_group_rule.ingress_through_http["9000"]: Creation complete after 2s [id=sgrule-1510616199]

Error: error creating ELBv2 Listener: LoadBalancerNotFound: Load balancer 'arn:aws:elasticloadbalancing:us-east-1:621884058757:loadbalancer/app/fnx-sonar-lb/9f5cf6d9fd79de06' not found
        status code: 400, request id: 193d19f2-9850-4ac7-9265-6ff5a2256c98



Error: Reference to "each" in context without for_each

  on .terraform/modules/sonarqube.ecs_fargate.ecs-fargate-service/main.tf line 63, in resource "aws_ecs_service" "service":
  63:       target_group_arn = each.key

The "each" object can be used only in "module" or "resource" blocks, and only
when the "for_each" argument is set.


Error: each.value cannot be used in this context

  on .terraform/modules/sonarqube.ecs_fargate.ecs-fargate-service/main.tf line 65, in resource "aws_ecs_service" "service":
  65:       container_port   = each.value

A reference to "each.value" has been used in a context in which it
unavailable, such as when the configuration no longer contains the value in
its "for_each" expression. Remove this reference to each.value in your
configuration to work around this error.

Releasing state lock. This may take a few moments...

I'm having an issue creating the load balancer, I haven't had a chance to debug but I'll take a look later.
Terraform v 0.13.5
Module version 2.0.20
Just thought I'd bring to your attention.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/pipeline.yml
  • actions/checkout v4
  • actions/checkout v4
terraform
main.tf
  • cn-terraform/cloudwatch-logs/aws 1.0.12
  • cn-terraform/ecs-fargate/aws 2.0.52
ssl.tf
  • terraform-aws-modules/acm/aws ~> 4.0
versions.tf
  • aws >= 4
  • random >= 3
  • hashicorp/terraform >= 0.13

  • Check this box to trigger a request for Renovate to run again on this repository

Invalid count argument

  • Terraform v. 0.12.31
  • Cn-terraform v. 2.0.15

Whenever I run terraform plan / terraform apply I get ...

Error: Invalid count argument

on .terraform/modules/sonar.ecs_fargate.ecs-fargate-service/main.tf line 123, in resource "aws_security_group_rule" "ingress_through_https":
123: count = length(data.aws_lb_target_group.lb_https_target_groups)

The "count" value depends on resource attributes that cannot be determined
until apply, so Terraform cannot predict how many instances will be created.
To work around this, use the -target argument to first apply only the
resources that the count depends on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.