important-book-47803
07/05/2024, 1:14 PMgreen-yacht-20252
07/05/2024, 1:56 PMadventurous-butcher-54166
07/05/2024, 1:57 PMadventurous-butcher-54166
07/05/2024, 1:59 PMimportant-book-47803
07/05/2024, 2:05 PMadventurous-butcher-54166
07/05/2024, 2:07 PMpulumi pre --diff --refresh show changing which are triggering recreation?important-book-47803
07/05/2024, 2:12 PM+-azure-native:servicebus:Namespace: (replace)
[id={id}]
[urn={urn}]
[provider={provider}]
- disableLocalAuth : false
- minimumTlsVersion : "1.0"
- privateEndpointConnections: []
- zoneRedundant : false
debug: Fields to assign: ["zoneRedundant","alternateName","privateEndpointConnections","tags","type","updatedAt","publicNetworkAccess","urn","createdAt","systemData","sku","location","provisioningState","serviceBusEndpoint","identity","metricId","minimumTlsVersion","id","status","disableLocalAuth","encryption","name"]
debug: Registering resource start: t=azure-native:servicebus:Namespace, name={name}, custom=True, remote=False
debug: Preparing resource: t=azure-native:servicebus:Namespace, name={name}, custom=True, remote=False
debug: Prepared resource: t=azure-native:servicebus:Namespace, name={name}, custom=True, remote=Falseadventurous-butcher-54166
07/05/2024, 2:14 PMZoneRedundant is the only parameter there that will trigger recreation (if changed)important-book-47803
07/05/2024, 2:21 PMZoneRedundant in code. I can have a look at setting to false explicitly to see if this clears it.important-book-47803
07/05/2024, 2:28 PMimportant-book-47803
07/05/2024, 2:37 PMadventurous-butcher-54166
07/05/2024, 2:39 PMservicebus.Namespace prior to updating azure-native to v2?adventurous-butcher-54166
07/05/2024, 2:40 PMadventurous-butcher-54166
07/05/2024, 2:43 PMimportant-book-47803
07/05/2024, 2:46 PMimportant-book-47803
07/05/2024, 2:48 PMvar serviceBusNamespace = new Namespace(_config.Name, new()
{
NamespaceName = _config.Name,
Location = _dependencies.ResourceGroupLocation,
ResourceGroupName = _dependencies.ResourceGroupName,
Sku = new SBSkuArgs
{
Name = SkuName.Standard,
Tier = SkuTier.Standard
},
Tags = _config.Tags
});important-book-47803
07/05/2024, 2:50 PMZoneRedundant = false to fix recreate for refresh but caused recreate on preview, but not for the v2 deployment so think it is something with defaults for that value in v1 and v2 as comparing azure template it is the same for v1 and v2 with exception name for environment etc.adventurous-butcher-54166
07/05/2024, 2:52 PMpulumi refresh and then pulumi preview ?What happens when you run pulumi pre --refresh --diffimportant-book-47803
07/05/2024, 2:58 PMpulumi preview -diff shows no changes
ii. pulumi preview --refresh -diff states that the service bus needs to be recreated
b. Adding in ZoneRedundant = false
i. pulumi preview -diff states that the service bus needs to be recreated
ii. pulumi preview --refresh -diff shows no changes
2. service bus deployed with azure native v2
a. Code from above
i. pulumi preview -diff shows no changes
ii. pulumi preview --refresh -diff shows no changes
b. Adding in ZoneRedundant = false
i. pulumi preview -diff wants to add new property but doesn't recreate
ii. pulumi preview --refresh -diff wants to add new property but doesn't recreateadventurous-butcher-54166
07/05/2024, 2:59 PMThat means it won't make any changes.shows no changespulumi preview --refresh -diff
adventurous-butcher-54166
07/05/2024, 3:00 PMadventurous-butcher-54166
07/05/2024, 3:01 PMimportant-book-47803
07/05/2024, 3:07 PMadventurous-butcher-54166
07/05/2024, 3:08 PMimportant-book-47803
07/05/2024, 3:11 PMadventurous-butcher-54166
07/05/2024, 3:14 PMpulumi up --refresh --diff – if that doesn't show any pending updates to be applied, then you're fine.adventurous-butcher-54166
07/05/2024, 3:16 PMoptions:
refresh: always
That will default on querying the Azure API on current state before doing any updates (default in Terraform but not Pulumi). This will slow things down a bit but I personally don't like applying changes into the dark...adventurous-butcher-54166
07/05/2024, 3:18 PM