GoogleCloudPlatform / terraform-google-alloy-db

Creates an Alloy DB instance
https://registry.terraform.io/modules/GoogleCloudPlatform/alloy-db/google
Apache License 2.0
17 stars 17 forks source link

Read_pool examples have invalid CPU configuration #74

Closed dtest closed 6 months ago

dtest commented 6 months ago

Following this read_pool_instance example leads to an invalid configuration.

Specifically, machine_cpu_count = 1 is invalid, and leads to this error in terraform apply:

module.alloy-db.google_alloydb_instance.read_pool["read-instance-1"]: Creating...
╷
│ Error: Error creating Instance: googleapi: Error 400: The request was invalid: Invalid machine (CPU) config: cpu_count must be one of [2 4 8 16 32 64 96 128]: got 1
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.BadRequest",
│     "fieldViolations": [
│       {
│         "field": "machineConfig"
│       }
│     ]
│   },
│   {
│     "@type": "type.googleapis.com/google.rpc.RequestInfo",
│     "requestId": "b201b76e23f334d7"
│   }
│ ]
│ 
│   with module.alloy-db.google_alloydb_instance.read_pool["read-instance-1"],
│   on .terraform/modules/alloy-db/main.tf line 177, in resource "google_alloydb_instance" "read_pool":
│  177: resource "google_alloydb_instance" "read_pool" {

The multiple read_pool example will also have this error.

Suggestion: