Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[alloydb] cannot set the initial user in the secondary cluster #2664

Open
baran81 opened this issue Nov 6, 2024 · 0 comments
Open

[alloydb] cannot set the initial user in the secondary cluster #2664

baran81 opened this issue Nov 6, 2024 · 0 comments
Assignees

Comments

@baran81
Copy link

baran81 commented Nov 6, 2024

Describe the bug
Alloydb module try to create the secondary cluster passing the initial_user argument.
the api fail with:

 Error: Error creating Cluster: googleapi: Error 400: The request was invalid: cannot set the initial user in the secondary cluster
 Details:
 [
   {
     "@type": "type.googleapis.com/google.rpc.BadRequest",
     "fieldViolations": [
       {
         "field": "initial_user"
       }
     ]
   },
   {
     "@type": "type.googleapis.com/google.rpc.RequestInfo",
     "requestId": "7f2f00895fffca09"
   }
 ]

   with module.alloydb["aiod1"].google_alloydb_cluster.secondary[0],
   on .terraform/modules/alloydb/main.tf line 226, in resource "google_alloydb_cluster" "secondary":
  226: resource "google_alloydb_cluster" "secondary" {

Environment

Terraform v1.9.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v6.6.0
+ provider registry.terraform.io/hashicorp/google-beta v6.6.0
+ provider registry.terraform.io/hashicorp/random v3.6.3

Your version of Terraform is out of date! The latest version
is 1.9.8. You can update by downloading from https://www.terraform.io/downloads.html

To Reproduce

create a cluster with secondary and set the initial user with name and password

Result

 Error: Error creating Cluster: googleapi: Error 400: The request was invalid: cannot set the initial user in the secondary cluster
 Details:
 [
   {
     "@type": "type.googleapis.com/google.rpc.BadRequest",
     "fieldViolations": [
       {
         "field": "initial_user"
       }
     ]
   },
   {
     "@type": "type.googleapis.com/google.rpc.RequestInfo",
     "requestId": "7f2f00895fffca09"
   }
 ]

   with module.alloydb["aiod1"].google_alloydb_cluster.secondary[0],
   on .terraform/modules/alloydb/main.tf line 226, in resource "google_alloydb_cluster" "secondary":
  226: resource "google_alloydb_cluster" "secondary" {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants