Giter Club home page Giter Club logo

Comments (6)

mkubenka avatar mkubenka commented on May 27, 2024 4

You can set replica_count = 0 to skip aws_rds_cluster_instance creation. In that case instance_type can be any value. Unfortunately, currently there is no option to configure scaling_configuration.

module "db" {
  source = "terraform-aws-modules/rds-aurora/aws"

  name = "test-aurora-serverless"

  engine         = "aurora"
  engine_mode    = "serverless"
  engine_version = "5.6.10a"
  family         = "aurora5.6"

  # Do not create cluster instance for serverless.
  replica_count = 0
  instance_type = "db.t2.micro"

  vpc_id  = "vpc-12345678"
  subnets = ["subnet-12345678", "subnet-87654321"]
}

from terraform-aws-rds-aurora.

krushnaDash avatar krushnaDash commented on May 27, 2024 1

From terraform 0.12 on wards you can write scaling_configuration as https://www.terraform.io/docs/providers/aws/r/rds_cluster.html#scaling_configuration

scaling_configuration {
auto_pause = var.auto_pause
max_capacity = 64
min_capacity = 1
seconds_until_auto_pause = 300
}

from terraform-aws-rds-aurora.

antonbabenko avatar antonbabenko commented on May 27, 2024

Check examples/serverless for serverless usage:

module "aurora" {
source = "../../"
name = "aurora-serverless"
engine = "aurora"
engine_mode = "serverless"
replica_scale_enabled = false
replica_count = 0
backtrack_window = 10 # ignored in serverless
subnets = data.aws_subnet_ids.all.ids
vpc_id = data.aws_vpc.default.id
monitoring_interval = 60
instance_type = "db.r4.large"
apply_immediately = true
skip_final_snapshot = true
storage_encrypted = true
db_parameter_group_name = aws_db_parameter_group.aurora_db_postgres96_parameter_group.id
db_cluster_parameter_group_name = aws_rds_cluster_parameter_group.aurora_cluster_postgres96_parameter_group.id
scaling_configuration = {
auto_pause = true
max_capacity = 256
min_capacity = 2
seconds_until_auto_pause = 300
timeout_action = "ForceApplyCapacityChange"
}
}

from terraform-aws-rds-aurora.

jurgenweber avatar jurgenweber commented on May 27, 2024

I am on tf v14 and aws provider version 3.21.0

Error: error creating RDS cluster: InvalidParameterValue: The engine mode serverless you requested is currently unavailable.

In the plan:

  + resource "aws_rds_cluster" "this" {
      + apply_immediately                   = false
      + arn                                 = (known after apply)
      + availability_zones                  = (known after apply)
      + backtrack_window                    = 0
      + backup_retention_period             = 1
      + cluster_identifier                  = "zxcv"
      + cluster_identifier_prefix           = (known after apply)
      + cluster_members                     = (known after apply)
      + cluster_resource_id                 = (known after apply)
      + copy_tags_to_snapshot               = true
      + database_name                       = (known after apply)
      + db_cluster_parameter_group_name     = "zxcv"
      + db_subnet_group_name                = "zxcv"
      + deletion_protection                 = false
      + enable_http_endpoint                = false
      + endpoint                            = (known after apply)
      + engine                              = "aurora"
      + engine_mode                         = "serverless"
      + engine_version                      = "2.07.1"
      + final_snapshot_identifier           = "zxcv-0014df3f"
      + hosted_zone_id                      = (known after apply)
      + iam_database_authentication_enabled = false
      + id                                  = (known after apply)
      + kms_key_id                          = (known after apply)
      + master_password                     = (sensitive value)
      + master_username                     = "zxcv"
      + port                                = 3306
      + preferred_backup_window             = "08:00-09:00"
      + preferred_maintenance_window        = "sun:10:00-sun:11:00"
      + reader_endpoint                     = (known after apply)
      + skip_final_snapshot                 = true
      + storage_encrypted                   = true
      + tags                                = {
          + "Environment" = "z"
          + "ID"          = "x"
          + "Location"    = "c"
          + "Module"      = "databases"
          + "Provider"    = "v"
        }
      + vpc_security_group_ids              = [
          + "sg-zxcv",
        ]

      + scaling_configuration {
          + auto_pause               = true
          + max_capacity             = 256
          + min_capacity             = 2
          + seconds_until_auto_pause = 300
          + timeout_action           = "ForceApplyCapacityChange"
        }
    }
    ```
    
    thoughts?

from terraform-aws-rds-aurora.

jurgenweber avatar jurgenweber commented on May 27, 2024

ok, so!!!

We created one manually, worked.. check cloudtrail for the requests.

engine_version = "5.7.mysql_aurora.2.07.1"

from terraform-aws-rds-aurora.

github-actions avatar github-actions commented on May 27, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

from terraform-aws-rds-aurora.

Related Issues (20)

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.