rapid-engineer-94232
06/29/2023, 11:41 AMdev.json
file that holds my state without finding any clues. The URNs still look correct, and the IDs that refer to the resources ids in Azure also look correct. I have attached screenshots from when I try to deploy the stack using V3.73.0 of the CLI on Windows (I also tried WSL with the same results). First image shows CLI results without any changes in code, the second shows the result when I change the tags of my resources.
Pulumi.dev.yaml:
config:
Project:tags:
- tag:
key: department
value: IT
- tag:
key: environment
value: sandbox
- tag:
key: team
value: web
- tag:
key: system
value: website
Snippets from Program.cs:
var tags = new InputMap<string>();
config.RequireObject<JsonElement[]>("tags")
.ToList()
.ForEach(element =>
tags.Add(
element.GetProperty("tag").GetProperty("key").GetString() ?? "",
element.GetProperty("tag").GetProperty("value").GetString() ?? ""));
return new WebApp("webapp", new WebAppArgs
{
ServerFarmId = appServicePlan.Id,
Location = rg.Location,
Name = "webapp",
Tags = tags,
ResourceGroupName = rg.Name,
VirtualNetworkSubnetId = webAppSubnet.Id,
Kind = "app,linux",
ClientCertEnabled = false,
HttpsOnly = true,
Reserved = true,
Enabled = true,
StorageAccountRequired = false,
Identity = new AzureNative.Web.Inputs.ManagedServiceIdentityArgs()
{
Type = ManagedServiceIdentityType.UserAssigned,
UserAssignedIdentities =
{
[tuple.Item1] = new Dictionary<object, object>()
}
},
SiteConfig = new SiteConfigArgs
{
AlwaysOn = true,
NumberOfWorkers = 1,
MinTlsVersion = "1.2",
LinuxFxVersion = "DOTNETCORE|6.0",
AppSettings = new List<NameValuePairArgs>
{
new NameValuePairArgs
{
Name = "DATBASE_HOST",
Value = localhost
},
}
}
}
, new CustomResourceOptions
{
DependsOn =
{
DbNetRule
}
});
melodic-tomato-39005
06/29/2023, 12:32 PMpulumi refresh
, and
2. run pulumi preview --diff
to show more data?rapid-engineer-94232
06/29/2023, 12:48 PM~ azure-native:resources:ResourceGroup: (update)
[id=/subscriptions/id/resourceGroups/appname-dev]
[urn=urn:pulumi:dev::project.Infrastructure::azure-native:resources:ResourceGroup::appname-dev]
[provider=urn:pulumi:dev::project.Infrastructure::pulumi:providers:azure-native::default_1_103_0::c4ad7357-cf22-4fea-8f17-f154b4f104bb]
~ tags: {
~ environment: "sandbox" => "dev"
}
But others, like the webapp, are marked for deletion:
- azure-native:web:WebApp: (delete)
[id=/subscriptions/id/resourceGroups/appname-dev/providers/Microsoft.Web/sites/appname-app-dev]
[urn=urn:pulumi:dev::project.Infrastructure::azure-native:web:WebApp::webapp]
[provider=urn:pulumi:dev::project.Infrastructure::pulumi:providers:azure-native::default_1_103_0::c4ad7357-cf22-4fea-8f17-f154b4f104bb]
clientCertEnabled : false
enabled : true
httpsOnly : true
hyperV : false
identity : {
type : "UserAssigned"
userAssignedIdentities: {
/subscriptions/id/resourcegroups/appname-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name: {}
}
}
isXenon : false
kind : "app,linux"
location : "norwayeast"
name : "appname-app-dev"
reserved : true
resourceGroupName : "appname-dev"
scmSiteAlsoStopped : false
serverFarmId : "/subscriptions/id/resourceGroups/app-name/providers/Microsoft.Web/serverfarms/service-plan-name"
siteConfig : {
alwaysOn : true
appSettings : [
[0]: {
name : "DATABASE_HOST"
value: "localhost"
}
]
http20Enabled : true
linuxFxVersion : "DOTNETCORE|6.0"
localMySqlEnabled : false
minTlsVersion : "1.2"
netFrameworkVersion: "v4.6"
numberOfWorkers : 1
}
storageAccountRequired: false
tags : {
department : "IT"
environment: "sandbox"
system : "website"
team : "web"
}
virtualNetworkSubnetId: "/subscriptions/id/resourceGroups/vnet-rg/providers/Microsoft.Network/virtualNetworks/vnet-name/subnets/subnet-name"
In total:
Resources:
~ 6 to update
- 8 to delete
14 changes. 12 unchanged