crossplane-contrib / provider-upjet-azure

Official Azure Provider for Crossplane by Upbound.
Apache License 2.0
52 stars 69 forks source link

Azure SQL FlexibleServer writeConnectionSecretToRef empty #768

Open nitang22 opened 2 weeks ago

nitang22 commented 2 weeks ago

Is there an existing issue for this?

Affected Resource(s)

dbformysql.azure.upbound.io/v1beta1 - FlexibleServer

Resource MRs required to reproduce the bug

No response

Steps to Reproduce


apiVersion: dbformysql.azure.upbound.io/v1beta1 kind: FlexibleServer metadata: labels: app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: {{ .Values.organization }}.{{ .Values.project }} name: {{ .Release.Name }} spec: writeConnectionSecretToRef: name: {{ index .Values "packages" "flexible-server-mysql" "writeConnectionSecretToRef" "name" }} namespace: {{ .Release.Namespace }}

What happened?

writeConnectionSecretToRef creates the secrets but it's empty

Relevant Error Output Snippet

k -n dev-flexible-server-mysql get secrets/connection-details -o yaml

```yaml
apiVersion: v1
kind: Secret
metadata:
  creationTimestamp: "2024-06-17T18:53:40Z"
  name: connection-details
  namespace: dev-flexible-server-mysql
  ownerReferences:
  - apiVersion: dbformysql.azure.upbound.io/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: FlexibleServer
    name: flexible-server-mysql
    uid: c616954a-e8c1-4ce7-a9c9-651b39f527e7
  resourceVersion: "119302"
  uid: 668fc761-e513-479d-ba55-f7e70e677be8
type: connection.crossplane.io/v1alpha1


### Crossplane Version

1.16.0

### Provider Version

1.2.0

### Kubernetes Version

_No response_

### Kubernetes Distribution

_No response_

### Additional Info

_No response_
turkenf commented 1 week ago

Hi @nitang22,

Thank you for bringing up this. Which fields do you want to see in secret? If the fields you want are not sensitive fields in the Terraform schema, we need to add configuration manually.

You can find more information here: Additional Sensitive Fields and Custom Connection Details