-
Notifications
You must be signed in to change notification settings - Fork 91
Description
What happened?
If you create two user resources for different databases, a requirement for logging in to Azure SQL with contained users, you will get an error creating login that the service principal already exists reconciling the second resource.
The login database and the CREATE LOGIN command is not optional in the reconciler, forcing a CREATE LOGIN for every CREATE USER, but for Azure SQL contained users across multiple databases, you want to run CREATE LOGIN once in the master database, and then CREATE USER in each database the user should have access to.
How can we reproduce it?
Apply CRDS such as:
`apiVersion: mssql.sql.m.crossplane.io/v1alpha1
kind: User
metadata:
name: user1
spec:
forProvider:
database: database1
loginDatabase: master
passwordSecretRef:
key: password
name: somecreds
providerConfigRef:
name: config
apiVersion: mssql.sql.m.crossplane.io/v1alpha1
kind: User
metadata:
name: user1
spec:
forProvider:
database: database2
loginDatabase: master
passwordSecretRef:
key: password
name: somecreds
providerConfigRef:
name: config
`
What environment did it happen in?
Crossplane version: v0.13.0
Kubernetes version: v1.32.7
Kubernetes distribution: Azure AKS
Metadata
Metadata
Assignees
Labels
Type
Projects
Status