Skip to content

Commit 07428e6

Browse files
ShilpiRachShilpiReerhardt
authored
Updated versions for Azure.Provisioning and Azure.Provisioning.AppService packages (dotnet#13281)
Update to the latest stable versions of Azure.Provisioning and Azure.Provisioning.AppService. This includes updating Azure.Core as well, since it is a transitive dependency. With this change, we are changing all ProvisioningOutput.Value to use the new `ToBicepExpression()` function which ensures the bicep is written like a human would write it. For example, it uses the resource's property as an expression instead of duplicating the values in multiple places: ```bicep param existingResourceName string resource redis 'Microsoft.Cache/redisEnterprise@2025-04-01' existing = { name: existingResourceName } output name string = existingResourceName // OLD output name string = redis.name // NEW ``` --------- Co-authored-by: Shilpi Rachna <shilpir@microsoft.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
1 parent b7eb10a commit 07428e6

File tree

96 files changed

+196
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+196
-195
lines changed

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
<PackageVersion Include="Microsoft.Extensions.Azure" Version="1.13.0" />
3737
<PackageVersion Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="8.4.0" />
3838
<!-- Azure Management SDK for .NET dependencies -->
39-
<PackageVersion Include="Azure.Provisioning" Version="1.3.0" />
39+
<PackageVersion Include="Azure.Provisioning" Version="1.4.0" />
4040
<PackageVersion Include="Azure.Provisioning.AppConfiguration" Version="1.1.0" />
4141
<PackageVersion Include="Azure.Provisioning.AppContainers" Version="1.1.0" />
42-
<PackageVersion Include="Azure.Provisioning.AppService" Version="1.2.0" />
42+
<PackageVersion Include="Azure.Provisioning.AppService" Version="1.3.0" />
4343
<PackageVersion Include="Azure.Provisioning.ApplicationInsights" Version="1.1.0" />
4444
<PackageVersion Include="Azure.Provisioning.ContainerRegistry" Version="1.1.0" />
4545
<PackageVersion Include="Azure.Provisioning.CognitiveServices" Version="1.1.0" />
@@ -163,7 +163,7 @@
163163
<!-- playground apps dependencies for javascript -->
164164
<PackageVersion Include="Swashbuckle.AspNetCore" Version="9.0.6" />
165165
<!-- Pinned versions for Component Governance - Remove when root dependencies are updated -->
166-
<PackageVersion Include="Azure.Core" Version="1.49.0" />
166+
<PackageVersion Include="Azure.Core" Version="1.50.0" />
167167
<PackageVersion Include="Azure.Identity" Version="1.17.0" />
168168
<!-- https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3313 -->
169169
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />

src/Aspire.Hosting.Azure.AIFoundry/AzureAIFoundryExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,10 +388,10 @@ private static void ConfigureInfrastructure(AzureResourceInfrastructure infrastr
388388

389389
infrastructure.Add(new ProvisioningOutput("endpoint", typeof(string))
390390
{
391-
Value = cogServicesAccount.Properties.Endpoint
391+
Value = cogServicesAccount.Properties.Endpoint.ToBicepExpression()
392392
});
393393

394-
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = cogServicesAccount.Name });
394+
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = cogServicesAccount.Name.ToBicepExpression() });
395395

396396
var resource = (AzureAIFoundryResource)infrastructure.AspireResource;
397397

src/Aspire.Hosting.Azure.AppConfiguration/AzureAppConfigurationExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public static IResourceBuilder<AzureAppConfigurationResource> AddAzureAppConfigu
5050
Tags = { { "aspire-resource-name", infrastructure.AspireResource.Name } }
5151
});
5252

53-
infrastructure.Add(new ProvisioningOutput("appConfigEndpoint", typeof(string)) { Value = store.Endpoint });
53+
infrastructure.Add(new ProvisioningOutput("appConfigEndpoint", typeof(string)) { Value = store.Endpoint.ToBicepExpression() });
5454

5555
// We need to output name to externalize role assignments.
56-
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = store.Name });
56+
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = store.Name.ToBicepExpression() });
5757
};
5858

5959
var resource = new AzureAppConfigurationResource(name, configureInfrastructure);

src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,45 +285,45 @@ public static IResourceBuilder<AzureContainerAppEnvironmentResource> AddAzureCon
285285
// Exposed so that callers reference the LA workspace in other bicep modules
286286
infra.Add(new ProvisioningOutput("AZURE_LOG_ANALYTICS_WORKSPACE_NAME", typeof(string))
287287
{
288-
Value = laWorkspace.Name
288+
Value = laWorkspace.Name.ToBicepExpression()
289289
});
290290

291291
infra.Add(new ProvisioningOutput("AZURE_LOG_ANALYTICS_WORKSPACE_ID", typeof(string))
292292
{
293-
Value = laWorkspace.Id
293+
Value = laWorkspace.Id.ToBicepExpression()
294294
});
295295

296296
// Required by the IContaineRegistry interface
297297
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_REGISTRY_NAME", typeof(string))
298298
{
299-
Value = containerRegistry.Name
299+
Value = containerRegistry.Name.ToBicepExpression()
300300
});
301301

302302
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_REGISTRY_ENDPOINT", typeof(string))
303303
{
304-
Value = containerRegistry.LoginServer
304+
Value = containerRegistry.LoginServer.ToBicepExpression()
305305
});
306306

307307
// Required by the IAzureContainerRegistry interface
308308
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID", typeof(string))
309309
{
310-
Value = identity.Id
310+
Value = identity.Id.ToBicepExpression()
311311
});
312312

313313
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_APPS_ENVIRONMENT_NAME", typeof(string))
314314
{
315-
Value = containerAppEnvironment.Name
315+
Value = containerAppEnvironment.Name.ToBicepExpression()
316316
});
317317

318318
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_APPS_ENVIRONMENT_ID", typeof(string))
319319
{
320-
Value = containerAppEnvironment.Id
320+
Value = containerAppEnvironment.Id.ToBicepExpression()
321321
});
322322

323323
// Required for azd to output the dashboard URL
324324
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_APPS_ENVIRONMENT_DEFAULT_DOMAIN", typeof(string))
325325
{
326-
Value = containerAppEnvironment.DefaultDomain
326+
Value = containerAppEnvironment.DefaultDomain.ToBicepExpression()
327327
});
328328
});
329329

src/Aspire.Hosting.Azure.AppService/AzureAppServiceEnvironmentExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ public static IResourceBuilder<AzureAppServiceEnvironmentResource> AddAzureAppSe
113113

114114
infra.Add(new ProvisioningOutput("name", typeof(string))
115115
{
116-
Value = plan.Name
116+
Value = plan.Name.ToBicepExpression()
117117
});
118118

119119
infra.Add(new ProvisioningOutput("planId", typeof(string))
120120
{
121-
Value = plan.Id
121+
Value = plan.Id.ToBicepExpression()
122122
});
123123

124124
infra.Add(new ProvisioningOutput("webSiteSuffix", typeof(string))
@@ -128,23 +128,23 @@ public static IResourceBuilder<AzureAppServiceEnvironmentResource> AddAzureAppSe
128128

129129
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_REGISTRY_NAME", typeof(string))
130130
{
131-
Value = containerRegistry.Name
131+
Value = containerRegistry.Name.ToBicepExpression()
132132
});
133133

134134
// AZD looks for this output to find the container registry endpoint
135135
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_REGISTRY_ENDPOINT", typeof(string))
136136
{
137-
Value = containerRegistry.LoginServer
137+
Value = containerRegistry.LoginServer.ToBicepExpression()
138138
});
139139

140140
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID", typeof(string))
141141
{
142-
Value = identity.Id
142+
Value = identity.Id.ToBicepExpression()
143143
});
144144

145145
infra.Add(new ProvisioningOutput("AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_CLIENT_ID", typeof(string))
146146
{
147-
Value = identity.ClientId
147+
Value = identity.ClientId.ToBicepExpression()
148148
});
149149

150150
if (resource.EnableDashboard)
@@ -204,12 +204,12 @@ public static IResourceBuilder<AzureAppServiceEnvironmentResource> AddAzureAppSe
204204

205205
infra.Add(new ProvisioningOutput("AZURE_APPLICATION_INSIGHTS_INSTRUMENTATIONKEY", typeof(string))
206206
{
207-
Value = applicationInsights.InstrumentationKey
207+
Value = applicationInsights.InstrumentationKey.ToBicepExpression()
208208
});
209209

210210
infra.Add(new ProvisioningOutput("AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING", typeof(string))
211211
{
212-
Value = applicationInsights.ConnectionString
212+
Value = applicationInsights.ConnectionString.ToBicepExpression()
213213
});
214214
}
215215
})

src/Aspire.Hosting.Azure.AppService/AzureAppServiceEnvironmentUtility.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ public static WebSite AddDashboard(AzureResourceInfrastructure infra,
102102
// This identity needs website contributor access on the websites for resource server to work
103103
infra.Add(new ProvisioningOutput("AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_ID", typeof(string))
104104
{
105-
Value = contributorIdentity.Id
105+
Value = contributorIdentity.Id.ToBicepExpression()
106106
});
107107

108108
infra.Add(new ProvisioningOutput("AZURE_WEBSITE_CONTRIBUTOR_MANAGED_IDENTITY_PRINCIPAL_ID", typeof(string))
109109
{
110-
Value = contributorIdentity.PrincipalId
110+
Value = contributorIdentity.PrincipalId.ToBicepExpression()
111111
});
112112

113113
return dashboard;

src/Aspire.Hosting.Azure.ApplicationInsights/AzureApplicationInsightsExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ public static IResourceBuilder<AzureApplicationInsightsResource> AddAzureApplica
9999
return appInsights;
100100
});
101101

102-
infrastructure.Add(new ProvisioningOutput("appInsightsConnectionString", typeof(string)) { Value = appInsights.ConnectionString });
102+
infrastructure.Add(new ProvisioningOutput("appInsightsConnectionString", typeof(string)) { Value = appInsights.ConnectionString.ToBicepExpression() });
103103

104104
// Add name output for the resource to externalize role assignments
105-
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = appInsights.Name });
105+
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = appInsights.Name.ToBicepExpression() });
106106
};
107107

108108
var resource = new AzureApplicationInsightsResource(name, configureInfrastructure);

src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static IResourceBuilder<AzureOpenAIResource> AddAzureOpenAI(this IDistrib
6666
});
6767

6868
// We need to output name to externalize role assignments.
69-
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = cogServicesAccount.Name });
69+
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = cogServicesAccount.Name.ToBicepExpression() });
7070

7171
var resource = (AzureOpenAIResource)infrastructure.AspireResource;
7272

src/Aspire.Hosting.Azure.ContainerRegistry/AzureContainerRegistryExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public static IResourceBuilder<AzureContainerRegistryResource> AddAzureContainer
4747

4848
infrastructure.Add(registry);
4949

50-
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = registry.Name });
51-
infrastructure.Add(new ProvisioningOutput("loginServer", typeof(string)) { Value = registry.LoginServer });
50+
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = registry.Name.ToBicepExpression() });
51+
infrastructure.Add(new ProvisioningOutput("loginServer", typeof(string)) { Value = registry.LoginServer.ToBicepExpression() });
5252
};
5353

5454
var resource = new AzureContainerRegistryResource(name, configureInfrastructure);

src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,12 @@ private static void ConfigureCosmosDBInfrastructure(AzureResourceInfrastructure
563563

564564
infrastructure.Add(new ProvisioningOutput("connectionString", typeof(string))
565565
{
566-
Value = cosmosAccount.DocumentEndpoint
566+
Value = cosmosAccount.DocumentEndpoint.ToBicepExpression()
567567
});
568568
}
569569

570570
// We need to output name to externalize role assignments.
571-
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = cosmosAccount.Name });
571+
infrastructure.Add(new ProvisioningOutput("name", typeof(string)) { Value = cosmosAccount.Name.ToBicepExpression() });
572572
}
573573

574574
internal static void AddContributorRoleAssignment(AzureResourceInfrastructure infra, CosmosDBAccount cosmosAccount, BicepValue<Guid> principalId)

0 commit comments

Comments
 (0)