142 references to AzureBicepResource
Aspire.Hosting.Azure (61)
AzureBicepResourceExtensions.cs (28)
23public static IResourceBuilder<AzureBicepResource> AddBicepTemplate(this IDistributedApplicationBuilder builder, [ResourceName] string name, string bicepFile) 28var resource = new AzureBicepResource(name, templateFile: path, templateString: null); 40public static IResourceBuilder<AzureBicepResource> AddBicepTemplateString(this IDistributedApplicationBuilder builder, [ResourceName] string name, string bicepContent) 44var resource = new AzureBicepResource(name, templateFile: null, templateString: bicepContent); 55public static BicepOutputReference GetOutput(this IResourceBuilder<AzureBicepResource> builder, string name) 66public static BicepSecretOutputReference GetSecretOutput(this IResourceBuilder<AzureBicepResource> builder, string name) 108/// <typeparam name="T">The <see cref="AzureBicepResource"/>.</typeparam> 113where T : AzureBicepResource 123/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 129where T : AzureBicepResource 139/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 145where T : AzureBicepResource 155/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 161where T : AzureBicepResource 171/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 177where T : AzureBicepResource 187/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 193where T : AzureBicepResource 201/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 207where T : AzureBicepResource 217/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 223where T : AzureBicepResource 233/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 239where T : AzureBicepResource 249/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 255where T : AzureBicepResource 265/// <typeparam name="T">The <see cref="AzureBicepResource"/></typeparam> 271where T : AzureBicepResource
BicepResourceAnnotation.cs (7)
11/// <param name="resource">The <see cref="AzureBicepResource"/> which should be used by the <see cref="AzureProvisioner"/>.</param> 15/// and only has built-in deployment logic for resources that derive from <see cref="AzureBicepResource"/>. This annotation 17/// provision an Azure resource for an Aspire resource type that does not itself derive from <see cref="AzureBicepResource"/>. 21/// resource to the application model. This type does not derive from <see cref="AzureBicepResource"/> but can be annotated with 31public class AzureBicepResourceAnnotation(AzureBicepResource resource) : IResourceAnnotation 34/// The <see cref="AzureBicepResource"/> derived resource. 36public AzureBicepResource Resource => resource;
Provisioning\AzureProvisionerExtensions.cs (1)
33builder.AddAzureProvisioner<AzureBicepResource, BicepProvisioner>();
Provisioning\Provisioners\BicepProvisioner.cs (25)
24ResourceLoggerService loggerService) : AzureResourceProvisioner<AzureBicepResource> 26public override bool ShouldProvision(IConfiguration configuration, AzureBicepResource resource) 29public override async Task<bool> ConfigureResourceAsync(IConfiguration configuration, AzureBicepResource resource, CancellationToken cancellationToken) 108public override async Task GetOrCreateResourceAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 137if (resource.Parameters.ContainsKey(AzureBicepResource.KnownParameters.KeyVaultName)) 189resource.Parameters[AzureBicepResource.KnownParameters.KeyVaultName] = keyVault.Data.Name; 353private static void PopulateWellKnownParameters(AzureBicepResource resource, ProvisioningContext context) 355if (resource.Parameters.TryGetValue(AzureBicepResource.KnownParameters.PrincipalId, out var principalId) && principalId is null) 357resource.Parameters[AzureBicepResource.KnownParameters.PrincipalId] = context.Principal.Id; 360if (resource.Parameters.TryGetValue(AzureBicepResource.KnownParameters.PrincipalName, out var principalName) && principalName is null) 362resource.Parameters[AzureBicepResource.KnownParameters.PrincipalName] = context.Principal.Name; 365if (resource.Parameters.TryGetValue(AzureBicepResource.KnownParameters.PrincipalType, out var principalType) && principalType is null) 367resource.Parameters[AzureBicepResource.KnownParameters.PrincipalType] = "User"; 370if (resource.Parameters.TryGetValue(AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId, out var logAnalyticsWorkspaceId) && logAnalyticsWorkspaceId is null) 373resource.Parameters.Remove(AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId); 377resource.Parameters[AzureBicepResource.KnownParameters.Location] = context.Location.Name; 422internal static string GetChecksum(AzureBicepResource resource, JsonObject parameters) 436internal static async ValueTask<string?> GetCurrentChecksumAsync(AzureBicepResource resource, IConfiguration section, CancellationToken cancellationToken = default) 471AzureBicepResource.KnownParameters.PrincipalName, 472AzureBicepResource.KnownParameters.PrincipalId, 473AzureBicepResource.KnownParameters.PrincipalType, 474AzureBicepResource.KnownParameters.KeyVaultName, 475AzureBicepResource.KnownParameters.Location, 476AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId, 480internal static async Task SetParametersAsync(JsonObject parameters, AzureBicepResource resource, bool skipDynamicValues = false, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.AppConfiguration (4)
AzureAppConfigurationExtensions.cs (4)
38var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 39var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 45.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 46.WithParameter(AzureBicepResource.KnownParameters.PrincipalType)
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
81public async Task<AzureBicepResource> CreateContainerAppAsync(IResource resource, AzureProvisioningOptions provisioningOptions, DistributedApplicationExecutionContext executionContext, CancellationToken cancellationToken)
Aspire.Hosting.Azure.ApplicationInsights (3)
AzureApplicationInsightsExtensions.cs (3)
64appInsights.WorkspaceResourceId = logAnalyticsWorkspace.Resource.WorkspaceId.AsProvisioningParameter(infrastructure, AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId); 88infrastructure.AspireResource.Parameters.TryAdd(AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId, null); 89var logAnalyticsWorkspaceParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId, typeof(string))
Aspire.Hosting.Azure.CognitiveServices (4)
AzureOpenAIExtensions.cs (4)
52var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 53var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 100.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 101.WithParameter(AzureBicepResource.KnownParameters.PrincipalType)
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
95.WithParameter(AzureBicepResource.KnownParameters.KeyVaultName)
Aspire.Hosting.Azure.EventHubs (4)
AzureEventHubsExtensions.cs (4)
50var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 51var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 72.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 73.WithParameter(AzureBicepResource.KnownParameters.PrincipalType)
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
54var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 55var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
Aspire.Hosting.Azure.KeyVault (4)
AzureKeyVaultResourceExtensions.cs (4)
51var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 52var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 59.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 60.WithParameter(AzureBicepResource.KnownParameters.PrincipalType)
Aspire.Hosting.Azure.PostgreSQL (13)
AzurePostgresExtensions.cs (13)
20private static IResourceBuilder<T> WithLoginAndPassword<T>(this IResourceBuilder<T> builder, PostgresServerResource postgresResource) where T : AzureBicepResource 71.WithParameter(AzureBicepResource.KnownParameters.KeyVaultName) 156var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 157var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 158var principalNameParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalName, typeof(string)); 184.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 185.WithParameter(AzureBicepResource.KnownParameters.PrincipalType) 186.WithParameter(AzureBicepResource.KnownParameters.PrincipalName) 351.WithParameter(AzureBicepResource.KnownParameters.KeyVaultName) 474builder.Resource.Parameters.Remove(AzureBicepResource.KnownParameters.PrincipalId); 475builder.Resource.Parameters.Remove(AzureBicepResource.KnownParameters.PrincipalType); 476builder.Resource.Parameters.Remove(AzureBicepResource.KnownParameters.PrincipalName); 501private static ParameterResource CreateDefaultUserNameParameter<T>(IResourceBuilder<T> builder) where T : AzureBicepResource
Aspire.Hosting.Azure.Redis (8)
AzureRedisExtensions.cs (8)
62.WithParameter(AzureBicepResource.KnownParameters.KeyVaultName) 134var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 135var principalNameParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalName, typeof(string)); 152.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 153.WithParameter(AzureBicepResource.KnownParameters.PrincipalName) 228.WithParameter(AzureBicepResource.KnownParameters.KeyVaultName) 281builder.Resource.Parameters.Remove(AzureBicepResource.KnownParameters.PrincipalId); 282builder.Resource.Parameters.Remove(AzureBicepResource.KnownParameters.PrincipalName);
Aspire.Hosting.Azure.Search (4)
AzureSearchExtensions.cs (4)
29.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 30.WithParameter(AzureBicepResource.KnownParameters.PrincipalType) 46var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 47var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
Aspire.Hosting.Azure.ServiceBus (4)
AzureServiceBusExtensions.cs (4)
45var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 46var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 88.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 89.WithParameter(AzureBicepResource.KnownParameters.PrincipalType)
Aspire.Hosting.Azure.SignalR (4)
AzureSignalRExtensions.cs (4)
51var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 52var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 58.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 59.WithParameter(AzureBicepResource.KnownParameters.PrincipalType)
Aspire.Hosting.Azure.Sql (9)
AzureSqlExtensions.cs (9)
29azureSqlDatabase.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 30.WithParameter(AzureBicepResource.KnownParameters.PrincipalName) 35azureSqlDatabase.WithParameter(AzureBicepResource.KnownParameters.PrincipalType); 94.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 95.WithParameter(AzureBicepResource.KnownParameters.PrincipalName) 102azureSqlServer.WithParameter(AzureBicepResource.KnownParameters.PrincipalType); 214var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 215var principalNameParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalName, typeof(string)); 245var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string));
Aspire.Hosting.Azure.Storage (4)
AzureStorageExtensions.cs (4)
61var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 62var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 76.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 77.WithParameter(AzureBicepResource.KnownParameters.PrincipalType)
Aspire.Hosting.Azure.Tests (7)
AzureBicepProvisionerTests.cs (5)
165.WithParameter(AzureBicepResource.KnownParameters.KeyVaultName); 170.WithParameter(AzureBicepResource.KnownParameters.KeyVaultName, "blah") 171.WithParameter(AzureBicepResource.KnownParameters.PrincipalId, "id") 172.WithParameter(AzureBicepResource.KnownParameters.Location, "tomorrow") 173.WithParameter(AzureBicepResource.KnownParameters.PrincipalType, "type");
AzureContainerAppsTests.cs (2)
877var resource = target?.DeploymentTarget as AzureBicepResource;
Aspire.Hosting.Azure.WebPubSub (4)
AzureWebPubSubExtensions.cs (4)
58var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 59var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 111.WithParameter(AzureBicepResource.KnownParameters.PrincipalId) 112.WithParameter(AzureBicepResource.KnownParameters.PrincipalType)
BicepSample.AppHost (1)
Program.cs (1)
10AzureBicepResource? temp00 = null;