Skip to content

Missing computed fields in pscAutoConnections (ipAddress, status, consumerNetworkStatus) #910

@mm-kumar

Description

@mm-kumar

Description

The pscAutoConnections block in DatabaseInstance (sql.gcp.m.upbound.io/v1beta1) is missing 3 computed fields that the Terraform google provider exposes:

Field Terraform Crossplane CRD Type
consumer_network / consumerNetwork ✅ Required ✅ Present Input
consumer_service_project_id / consumerServiceProjectId ✅ Optional ✅ Present Input
ip_address / ipAddress ✅ Computed Missing Output
status ✅ Computed Missing Output
consumer_network_status / consumerNetworkStatus ✅ Computed Missing Output

Impact

Without ipAddress in status.atProvider, Crossplane compositions cannot create DNS records for CloudSQL PSC auto-endpoints. This breaks the self-service model — users must manually create DNS records outside Crossplane.

The GCP API returns the IP in settings.ipConfiguration.pscConfig.pscAutoConnections[].ipAddress, but the Crossplane CRD doesn't include it in either spec or status schema.

Expected behavior

The 3 computed fields should appear in status.atProvider.settings.ipConfiguration.pscConfig[].pscAutoConnections[]:

status:
  atProvider:
    settings:
      ipConfiguration:
        pscConfig:
          - pscAutoConnections:
              - consumerNetwork: "projects/my-project/global/networks/my-vpc"
                consumerServiceProjectId: "my-project"
                ipAddress: "10.1.0.109"           # MISSING
                status: "ACTIVE"                   # MISSING
                consumerNetworkStatus: "VALID"     # MISSING

Reproduction

# GCP API returns the IP
gcloud sql instances describe <instance> --format="json(settings.ipConfiguration.pscConfig.pscAutoConnections)"
# Returns: ipAddress: "10.1.0.109", status: "ACTIVE", consumerNetworkStatus: "VALID"

# Crossplane status is missing it
kubectl get databaseinstance <name> -o jsonpath='{.status.atProvider.settings.ipConfiguration.pscConfig[0].pscAutoConnections}'
# Returns: only consumerNetwork and consumerServiceProjectId

Use case

We use Service Connection Policies (SCP) with pscAutoConnections for self-service CloudSQL provisioning via Crossplane. The SCP auto-creates PSC endpoints with auto-allocated IPs. We need the IP to create DNS records in the same composition — making the entire flow self-service (one XR creates DB + PSC endpoint + DNS).

Versions

  • Provider: upbound/provider-gcp-sql v2.5.2
  • Crossplane: v2.2.0
  • Terraform google provider equivalent: v6.37.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions