I am using an `AzureNative.Sql.Server` database. I...
# azure
i
I am using an
AzureNative.Sql.Server
database. I want to make a small configuration change to the DB server, but pulumi wants to delete and replace the entire database server, all of the databases, etc. Is there a way to avoid this? I’ve tried making the change manually and
pulumi refresh
as well with same results.
c
What's the configuration change that you are making? It's possible that that change does not support an in-ppace update. Also you should consider setting the resource option
protect
so that you don't accidentally execute a replacement that would delete the original db resource.
i
Basically adding a managed identity … added:
Copy code
Identity = new Pulumi.AzureNative.Sql.Inputs.ResourceIdentityArgs
            {
                Type = Pulumi.AzureNative.Sql.IdentityType.SystemAssigned
            },
interesting, ill take a look at
protect
… wasn’t aware of this one yet
c
Hmm that's interesting...can you run a preview with the
--diff
flag and post the detailed diff for your db resource here?
i
Sorry for delay … here is an example:
Copy code
--azure-native:sql:Server: (delete-replaced)
 +-azure-native:sql:Server: (replace)
      ~ administrators: {
          ~ login: "sp-pulumi-production" => "sp-pulumi-nonproduction"
        }
 ++azure-native:sql:Server: (create-replacement)
      ~ administrators: {
          ~ login: "sp-pulumi-production" => "sp-pulumi-nonproduction"
        }
(reviving in case anyone has any thoughts) in this particular case … i’m literally only changing the display name of the administrator account and it wants to delete and completely replace the database, and all dependents
c
Your detailed diff seems to indicate that there was already an identity assigned. It's possible that changing the identity is not an in-place update. Also the
administrators
property and the
identity
seem to have the same description. Even though you set the
identity
property it seems that the
administrators
property is changing? That seems odd. Any chance you can post the entire code related to the SQL Server resource?
i
i think the problem is the one listed here : https://github.com/pulumi/pulumi-azure-native/issues/1738 … basically Azure API not Pulumi is causing this ridiculousness 😅
c
Ah yes. Yeah the real issue is described in this comment: https://github.com/pulumi/pulumi-azure-native/issues/1738#issuecomment-1144987215.