This message was deleted.
# azure
s
This message was deleted.
b
We performed this replace on one environment and did a subsequent pulumi up and it states the DB has to be replaced again, which seems not good.
p
are you creating your DB inside an
apply
call?
t
Could you please share the code snippet and your preview details? Which property causes a replacement?
b
@prehistoric-nail-50687 it is not inside an apply call.
@tall-librarian-49374 It looks like it might be doing it because of an ActiveDirectory login or a private endpoint.
sql-gway-itdev (azure-native:sql:Server)
++ azure-native:sql:Server (create-replacement)
[id=/subscriptions/<SubscriptionId>/resourceGroups/rg-gateway-itdev/providers/Microsoft.Sql/servers/sql-gway-itdev]
[urn=urn:pulumi:itdev::gateway::azure-native:sql:Server::sql-gway-itdev]
administrators            : {
administratorType: "ActiveDirectory"
login            : "IT_DBA"
sid              : "f032d760-5ba8-4a27-8fc5-d686ecf8b65a"
tenantId         : "<TenantId>"
}
privateEndpointConnections: [
[0]: {
id        : "/subscriptions/<SubscriptionId>/resourceGroups/rg-gateway-itdev/providers/Microsoft.Sql/servers/sql-gway-itdev/privateEndpointConnections/pec-sql-gway-itdev-407e2300-20ed-43d7-a100-a9483aef99e5"
properties: {
privateEndpoint                  : {
id: "/subscriptions/<SubscriptionId>/resourceGroups/rg-spoke-nonprod/providers/Microsoft.Network/privateEndpoints/pec-sql-gway-itdev"
}
privateLinkServiceConnectionState: {
actionsRequired: "None"
description    : "Auto-approved"
status         : "Approved"
}
provisioningState                : "Ready"
}
}
]
@tall-librarian-49374 is there a good way to share a snippet of code?
I can just add an attachment I suppose.
We've been using this code for a while now and this is the first time this has started happening.
@billions-judge-12256 ^^
t
It looks like you set the administrator and private connections via separate resource but then the main resources gets these changes and tries to replace itself to delete them. Am I reading this correctly? If so, that’s the same class of issue as https://github.com/pulumi/pulumi-azure-native/issues/611 Could you open an issue to track this?
b
@tall-librarian-49374 to clarify what you're asking: We are creating the server and database, then later we are adding the Active Directory to it. However it looks like potentially we could add the active directory to the sql server declaration directly.
Ahhhh and maybe this is also true about private end points as well?
Is it possible to add the private endpoints directly within the resource as well?
@tall-librarian-49374 we were able to resolve the issue by moving the active directory declaration directly inside the sql server declaration.