cloud-foundation-toolkit: cloud_sql.py returns 400
With some very minor naming changes to fit this into our own codebase but this doesn’t work as it is returning this error on the first run after the creation preview.
Waiting for update [operation-1578326201106-59b7ab48e8013-4ab7a06c-f57787da]...failed.
ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation [operation-1578326201106-59b7ab48e8013-4ab7a06c-f57787da]: errors:
- code: RESOURCE_ERROR
location: /deployments/test-cloud-sql-deploy/resources/cloud-sql-user-1
message: '{"ResourceType":"gcp-types/sqladmin-v1beta4:users","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"message":"Request
contains an invalid argument.","status":"INVALID_ARGUMENT","statusMessage":"Bad
Request","requestPath":"https://www.googleapis.com/sql/v1beta4/projects/<proj id>/instances/cloud-sql-postgres-instance/users","httpMethod":"POST"}}'
Using the cloud_sql.py
, cloud_sql.py.schema
and cloud_sql_postgres.yaml
and deploying using deployment-manager.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (17 by maintainers)
@rick-pri The deployment manager team released an update, from now on every value which is called
password
orsecret
will be redacted and will not show up in logs or DM portal.@matthias-baetens Would you mind to give me your yaml so I can reproduce your error?
Thank you for your deep investigation. Let try to reproduce your errors. I have to admit I am not a Postgres expert but let me share my early findings:
The current example fails for postgres
For a currently unknown reason if I call the api manually I am getting a better error message, which helped me to find the issue:
This means the following example is working:
I will try to find time to create a test for postgres as. Please let me know if this solved your issue or you still having problems with regions/zones?