provider-gcp icon indicating copy to clipboard operation
provider-gcp copied to clipboard

connect failed: cannot create new Sqladmin Service: unexpected end of JSON input

Open nataliyalevytska opened this issue 2 years ago • 2 comments

What happened?

  1. installed crossplane v1.8.0 & provider-gcp v0.21.0
  2. created MySQLInstance claim in namespace
  3. get the following on CloudSQLInstance
Status:
  At Provider:
  Conditions:
    Last Transition Time:  2022-07-27T13:15:04Z
    Message:               connect failed: cannot create new Sqladmin Service: unexpected end of JSON input
    Reason:                ReconcileError
    Status:                False
    Type:                  Synced
Events:
  Type     Reason                   Age                  From                                                 Message
  ----     ------                   ----                 ----                                                 -------
  Warning  CannotConnectToProvider  15s (x9 over 2m44s)  managed/cloudsqlinstance.database.gcp.crossplane.io  cannot create new Sqladmin Service: unexpected end of JSON input

Details:

apiVersion: database.gcp.crossplane.io/v1beta1
kind: CloudSQLInstance
metadata:
  name: test-crossplane
spec:
  forProvider:
    databaseVersion: POSTGRES_11
    region: eu-west1
    settings:
      tier: db-custom-1-3840
      dataDiskSizeGb: 20
  providerConfigRef:
    name: gcp-provider-config
  writeConnectionSecretToRef:
    name: test-connection
    namespace: crossplane-system

nataliyalevytska avatar Jul 27 '22 13:07 nataliyalevytska

Hey @nataliyalevytska, thanks for raising this issue!

I believe that is because of misconfigured GCP credentials in your ProviderConfig. Have you fixed the error?

Feggah avatar Oct 20 '22 22:10 Feggah

I'm experiencing this as well and can validate that my credentials are correct. Would the error output if the service account doesn't have the correct permissions for the project in gcp?

ndlanier avatar Nov 22 '22 20:11 ndlanier