crossplane-contrib / provider-sql

An SQL provider for @crossplane
https://crossplane.io
Apache License 2.0
100 stars 57 forks source link

MSSQL database user #158

Closed seanlucey closed 6 months ago

seanlucey commented 10 months ago

What happened?

Attempting to create MSSQL User. User fails to create with managed/user.mssql.sql.crossplane.io cannot create user: mssql: You can only create a user with a password in a contained database.

How can we reproduce it?

Using the following:

apiVersion: mssql.sql.crossplane.io/v1alpha1
kind: User
metadata:
  name: user-name
spec:
  deletionPolicy: Delete
  forProvider:
    databaseRef: 
      name: database-name
    passwordSecretRef:
      name: password-secret
      namespace: namespace
      key: password
  providerConfigRef:
    name: provider-config

What environment did it happen in?

Crossplane version: 1.12.2

AGrzes commented 9 months ago

I encountered this bug and was able to workaround the issue by enabling contained databases. https://stackoverflow.com/a/51671176 But it would be nice to be able to set the options automatically when creating database using provider-sql

Alternatively the create user operation could split login and user creation https://stackoverflow.com/a/54679117

vykovalenko commented 7 months ago

Hi Team do you have any updates about this bugfix?