Skip to content

Commit

Permalink
Update Terraform cn-terraform/ecs-fargate/aws to v2.0.39 (#51)
Browse files Browse the repository at this point in the history
* Update Terraform cn-terraform/ecs-fargate/aws to v2.0.39

* Add missing variables

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Julian Nonino <noninojulian@gmail.com>
  • Loading branch information
3 people authored May 20, 2022
1 parent c2ba310 commit d07be2a
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ In order to run all checks at any point run the following command:
|------|--------|---------|
| <a name="module_acm"></a> [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 3.0 |
| <a name="module_aws_cw_logs"></a> [aws\_cw\_logs](#module\_aws\_cw\_logs) | cn-terraform/cloudwatch-logs/aws | 1.0.10 |
| <a name="module_ecs_fargate"></a> [ecs\_fargate](#module\_ecs\_fargate) | cn-terraform/ecs-fargate/aws | 2.0.38 |
| <a name="module_ecs_fargate"></a> [ecs\_fargate](#module\_ecs\_fargate) | cn-terraform/ecs-fargate/aws | 2.0.39 |

## Resources

Expand All @@ -70,13 +70,16 @@ In order to run all checks at any point run the following command:
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_availability_zones"></a> [availability\_zones](#input\_availability\_zones) | List of Availability Zones | `list(string)` | n/a | yes |
| <a name="input_block_s3_bucket_public_access"></a> [block\_s3\_bucket\_public\_access](#input\_block\_s3\_bucket\_public\_access) | (Optional) If true, public access to the S3 bucket will be blocked. | `bool` | `true` | no |
| <a name="input_db_engine_version"></a> [db\_engine\_version](#input\_db\_engine\_version) | DB engine version | `string` | `"14.2"` | no |
| <a name="input_db_instance_size"></a> [db\_instance\_size](#input\_db\_instance\_size) | DB instance size | `string` | `"db.r4.large"` | no |
| <a name="input_db_name"></a> [db\_name](#input\_db\_name) | Default DB name | `string` | `"sonar"` | no |
| <a name="input_db_password"></a> [db\_password](#input\_db\_password) | DB password | `string` | `""` | no |
| <a name="input_db_username"></a> [db\_username](#input\_db\_username) | Default DB username | `string` | `"sonar"` | no |
| <a name="input_dns_zone_id"></a> [dns\_zone\_id](#input\_dns\_zone\_id) | Route 53 zone id | `string` | `""` | no |
| <a name="input_enable_autoscaling"></a> [enable\_autoscaling](#input\_enable\_autoscaling) | Enable auto scaling for datacenter edition | `bool` | `false` | no |
| <a name="input_enable_s3_bucket_server_side_encryption"></a> [enable\_s3\_bucket\_server\_side\_encryption](#input\_enable\_s3\_bucket\_server\_side\_encryption) | (Optional) If true, server side encryption will be applied. | `bool` | `true` | no |
| <a name="input_enable_s3_logs"></a> [enable\_s3\_logs](#input\_enable\_s3\_logs) | (Optional) If true, all resources to send LB logs to S3 will be created | `bool` | `true` | no |
| <a name="input_enable_ssl"></a> [enable\_ssl](#input\_enable\_ssl) | Enable SSL | `bool` | `true` | no |
| <a name="input_ephemeral_storage_size"></a> [ephemeral\_storage\_size](#input\_ephemeral\_storage\_size) | The number of GBs to provision for ephemeral storage on Fargate tasks. Must be greater than or equal to 21 and less than or equal to 200 | `number` | `0` | no |
| <a name="input_https_record_domain_name"></a> [https\_record\_domain\_name](#input\_https\_record\_domain\_name) | Route 53 domain name | `string` | `""` | no |
Expand All @@ -88,6 +91,8 @@ In order to run all checks at any point run the following command:
| <a name="input_private_subnets_ids"></a> [private\_subnets\_ids](#input\_private\_subnets\_ids) | List of Private Subnets IDs | `list(string)` | n/a | yes |
| <a name="input_public_subnets_ids"></a> [public\_subnets\_ids](#input\_public\_subnets\_ids) | List of Public Subnets IDs | `list(string)` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | AWS Region the infrastructure is hosted in | `string` | n/a | yes |
| <a name="input_s3_bucket_server_side_encryption_key"></a> [s3\_bucket\_server\_side\_encryption\_key](#input\_s3\_bucket\_server\_side\_encryption\_key) | (Optional) The AWS KMS master key ID used for the SSE-KMS encryption. This can only be used when you set the value of sse\_algorithm as aws:kms. The default aws/s3 AWS KMS master key is used if this element is absent while the sse\_algorithm is aws:kms. | `string` | `"aws/s3"` | no |
| <a name="input_s3_bucket_server_side_encryption_sse_algorithm"></a> [s3\_bucket\_server\_side\_encryption\_sse\_algorithm](#input\_s3\_bucket\_server\_side\_encryption\_sse\_algorithm) | (Optional) The server-side encryption algorithm to use. Valid values are AES256 and aws:kms | `string` | `"aws:kms"` | no |
| <a name="input_sonarqube_image"></a> [sonarqube\_image](#input\_sonarqube\_image) | Sonarqube image | `string` | `"sonarqube:lts"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Resource tags | `map(string)` | `{}` | no |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | ID of the VPC | `string` | n/a | yes |
Expand Down
17 changes: 11 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module "aws_cw_logs" {
#------------------------------------------------------------------------------
module "ecs_fargate" {
source = "cn-terraform/ecs-fargate/aws"
version = "2.0.38"
version = "2.0.39"
# source = "../terraform-aws-ecs-fargate"

name_prefix = "${var.name_prefix}-sonar"
Expand All @@ -50,13 +50,18 @@ module "ecs_fargate" {
enable_autoscaling = var.enable_autoscaling
ephemeral_storage_size = var.ephemeral_storage_size

lb_http_ports = var.lb_http_ports

lb_https_ports = var.lb_https_ports

# Application Load Balancer
lb_http_ports = var.lb_http_ports
lb_https_ports = var.lb_https_ports
lb_enable_cross_zone_load_balancing = var.lb_enable_cross_zone_load_balancing
default_certificate_arn = var.enable_ssl ? module.acm[0].acm_certificate_arn : null

default_certificate_arn = var.enable_ssl ? module.acm[0].acm_certificate_arn : null
# Application Load Balancer Logs
enable_s3_logs = var.enable_s3_logs
block_s3_bucket_public_access = var.block_s3_bucket_public_access
enable_s3_bucket_server_side_encryption = var.enable_s3_bucket_server_side_encryption
s3_bucket_server_side_encryption_sse_algorithm = var.s3_bucket_server_side_encryption_sse_algorithm
s3_bucket_server_side_encryption_key = var.s3_bucket_server_side_encryption_key

command = [
"-Dsonar.search.javaAdditionalOpts=-Dnode.store.allow_mmap=false"
Expand Down
33 changes: 33 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,39 @@ variable "lb_https_ports" {
}
}

#------------------------------------------------------------------------------
# APPLICATION LOAD BALANCER LOGS
#------------------------------------------------------------------------------
variable "enable_s3_logs" {
description = "(Optional) If true, all resources to send LB logs to S3 will be created"
type = bool
default = true
}

variable "block_s3_bucket_public_access" {
description = "(Optional) If true, public access to the S3 bucket will be blocked."
type = bool
default = true
}

variable "enable_s3_bucket_server_side_encryption" {
description = "(Optional) If true, server side encryption will be applied."
type = bool
default = true
}

variable "s3_bucket_server_side_encryption_sse_algorithm" {
description = "(Optional) The server-side encryption algorithm to use. Valid values are AES256 and aws:kms"
type = string
default = "aws:kms"
}

variable "s3_bucket_server_side_encryption_key" {
description = "(Optional) The AWS KMS master key ID used for the SSE-KMS encryption. This can only be used when you set the value of sse_algorithm as aws:kms. The default aws/s3 AWS KMS master key is used if this element is absent while the sse_algorithm is aws:kms."
type = string
default = "aws/s3"
}

#------------------------------------------------------------------------------
# AWS RDS settings
#------------------------------------------------------------------------------
Expand Down

2 comments on commit d07be2a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’° Infracost estimate: monthly cost will increase by $388 πŸ“ˆ

Project Previous New Diff
cn-terraform/terraform-aws-sonarqube $0 $388 +$388
Infracost output
Project: cn-terraform/terraform-aws-sonarqube

+ module.base-network.aws_nat_gateway.nat_gw[0]
  +$32.85

    + NAT gateway
      +$32.85

    + Data processed
      Monthly cost depends on usage
        +$0.045 per GB

+ module.base-network.aws_nat_gateway.nat_gw[1]
  +$32.85

    + NAT gateway
      +$32.85

    + Data processed
      Monthly cost depends on usage
        +$0.045 per GB

+ module.base-network.aws_nat_gateway.nat_gw[2]
  +$32.85

    + NAT gateway
      +$32.85

    + Data processed
      Monthly cost depends on usage
        +$0.045 per GB

+ module.base-network.aws_nat_gateway.nat_gw[3]
  +$32.85

    + NAT gateway
      +$32.85

    + Data processed
      Monthly cost depends on usage
        +$0.045 per GB

+ module.sonar.aws_kms_key.encryption_key
  +$1.00

    + Customer master key
      +$1.00

    + Requests
      Monthly cost depends on usage
        +$0.03 per 10k requests

    + ECC GenerateDataKeyPair requests
      Monthly cost depends on usage
        +$0.10 per 10k requests

    + RSA GenerateDataKeyPair requests
      Monthly cost depends on usage
        +$0.10 per 10k requests

+ module.sonar.aws_rds_cluster.aurora_db
  Monthly cost depends on usage

    + Storage
      Monthly cost depends on usage
        +$0.10 per GB

    + I/O requests
      Monthly cost depends on usage
        +$0.20 per 1M requests

    + Backup storage
      Monthly cost depends on usage
        +$0.021 per GB

    + Snapshot export
      Monthly cost depends on usage
        +$0.01 per GB

+ module.sonar.aws_rds_cluster_instance.aurora_db_cluster_instances[0]
  +$59.86

    + Database instance (on-demand, db.t3.medium)
      +$59.86

+ module.sonar.aws_rds_cluster_instance.aurora_db_cluster_instances[1]
  +$59.86

    + Database instance (on-demand, db.t3.medium)
      +$59.86

+ module.sonar.aws_rds_cluster_instance.aurora_db_cluster_instances[2]
  +$59.86

    + Database instance (on-demand, db.t3.medium)
      +$59.86

+ module.sonar.aws_rds_cluster_instance.aurora_db_cluster_instances[3]
  +$59.86

    + Database instance (on-demand, db.t3.medium)
      +$59.86

+ module.sonar.module.aws_cw_logs.aws_cloudwatch_log_group.log_group
  Monthly cost depends on usage

    + Data ingested
      Monthly cost depends on usage
        +$0.50 per GB

    + Archival Storage
      Monthly cost depends on usage
        +$0.03 per GB

    + Insights queries data scanned
      Monthly cost depends on usage
        +$0.005 per GB

+ module.sonar.module.ecs_fargate.module.ecs-fargate-service.aws_ecs_service.service
  $0.00

    + Per GB per hour
      $0.00

    + Per vCPU per hour
      $0.00

+ module.sonar.module.ecs_fargate.module.ecs-fargate-service.module.ecs-alb.aws_lb.lb
  +$16.43

    + Application load balancer
      +$16.43

    + Load balancer capacity units
      Monthly cost depends on usage
        +$5.84 per LCU

+ module.sonar.module.ecs_fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket.logs
  Monthly cost depends on usage

    + Standard
    
        + Storage
          Monthly cost depends on usage
            +$0.023 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.005 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.0004 per 1k requests
    
        + Select data scanned
          Monthly cost depends on usage
            +$0.002 per GB
    
        + Select data returned
          Monthly cost depends on usage
            +$0.0007 per GB

Monthly cost change for cn-terraform/terraform-aws-sonarqube
Amount:  +$388 ($0.00 β†’ $388)

──────────────────────────────────
Key: ~ changed, + added, - removed

70 cloud resources were detected:
βˆ™ 14 were estimated, 12 of which include usage-based costs, see https://infracost.io/usage-file
βˆ™ 55 were free, rerun with --show-skipped to see details
βˆ™ 1 is not supported yet, rerun with --show-skipped to see details
Is this comment useful? Yes, No

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’° Infracost estimate: monthly cost will increase by $388 πŸ“ˆ

Project Previous New Diff
cn-terraform/terraform-aws-sonarqube $0 $388 +$388
Infracost output
Project: cn-terraform/terraform-aws-sonarqube

+ module.base-network.aws_nat_gateway.nat_gw[0]
  +$32.85

    + NAT gateway
      +$32.85

    + Data processed
      Monthly cost depends on usage
        +$0.045 per GB

+ module.base-network.aws_nat_gateway.nat_gw[1]
  +$32.85

    + NAT gateway
      +$32.85

    + Data processed
      Monthly cost depends on usage
        +$0.045 per GB

+ module.base-network.aws_nat_gateway.nat_gw[2]
  +$32.85

    + NAT gateway
      +$32.85

    + Data processed
      Monthly cost depends on usage
        +$0.045 per GB

+ module.base-network.aws_nat_gateway.nat_gw[3]
  +$32.85

    + NAT gateway
      +$32.85

    + Data processed
      Monthly cost depends on usage
        +$0.045 per GB

+ module.sonar.aws_kms_key.encryption_key
  +$1.00

    + Customer master key
      +$1.00

    + Requests
      Monthly cost depends on usage
        +$0.03 per 10k requests

    + ECC GenerateDataKeyPair requests
      Monthly cost depends on usage
        +$0.10 per 10k requests

    + RSA GenerateDataKeyPair requests
      Monthly cost depends on usage
        +$0.10 per 10k requests

+ module.sonar.aws_rds_cluster.aurora_db
  Monthly cost depends on usage

    + Storage
      Monthly cost depends on usage
        +$0.10 per GB

    + I/O requests
      Monthly cost depends on usage
        +$0.20 per 1M requests

    + Backup storage
      Monthly cost depends on usage
        +$0.021 per GB

    + Snapshot export
      Monthly cost depends on usage
        +$0.01 per GB

+ module.sonar.aws_rds_cluster_instance.aurora_db_cluster_instances[0]
  +$59.86

    + Database instance (on-demand, db.t3.medium)
      +$59.86

+ module.sonar.aws_rds_cluster_instance.aurora_db_cluster_instances[1]
  +$59.86

    + Database instance (on-demand, db.t3.medium)
      +$59.86

+ module.sonar.aws_rds_cluster_instance.aurora_db_cluster_instances[2]
  +$59.86

    + Database instance (on-demand, db.t3.medium)
      +$59.86

+ module.sonar.aws_rds_cluster_instance.aurora_db_cluster_instances[3]
  +$59.86

    + Database instance (on-demand, db.t3.medium)
      +$59.86

+ module.sonar.module.aws_cw_logs.aws_cloudwatch_log_group.log_group
  Monthly cost depends on usage

    + Data ingested
      Monthly cost depends on usage
        +$0.50 per GB

    + Archival Storage
      Monthly cost depends on usage
        +$0.03 per GB

    + Insights queries data scanned
      Monthly cost depends on usage
        +$0.005 per GB

+ module.sonar.module.ecs_fargate.module.ecs-fargate-service.aws_ecs_service.service
  $0.00

    + Per GB per hour
      $0.00

    + Per vCPU per hour
      $0.00

+ module.sonar.module.ecs_fargate.module.ecs-fargate-service.module.ecs-alb.aws_lb.lb
  +$16.43

    + Application load balancer
      +$16.43

    + Load balancer capacity units
      Monthly cost depends on usage
        +$5.84 per LCU

+ module.sonar.module.ecs_fargate.module.ecs-fargate-service.module.ecs-alb.module.lb_logs_s3[0].aws_s3_bucket.logs
  Monthly cost depends on usage

    + Standard
    
        + Storage
          Monthly cost depends on usage
            +$0.023 per GB
    
        + PUT, COPY, POST, LIST requests
          Monthly cost depends on usage
            +$0.005 per 1k requests
    
        + GET, SELECT, and all other requests
          Monthly cost depends on usage
            +$0.0004 per 1k requests
    
        + Select data scanned
          Monthly cost depends on usage
            +$0.002 per GB
    
        + Select data returned
          Monthly cost depends on usage
            +$0.0007 per GB

Monthly cost change for cn-terraform/terraform-aws-sonarqube
Amount:  +$388 ($0.00 β†’ $388)

──────────────────────────────────
Key: ~ changed, + added, - removed

70 cloud resources were detected:
βˆ™ 14 were estimated, 12 of which include usage-based costs, see https://infracost.io/usage-file
βˆ™ 55 were free, rerun with --show-skipped to see details
βˆ™ 1 is not supported yet, rerun with --show-skipped to see details
Is this comment useful? Yes, No

Please sign in to comment.