105 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) 138if (resource.Parameters.ContainsKey(AzureBicepResource.KnownParameters.KeyVaultName)) 190resource.Parameters[AzureBicepResource.KnownParameters.KeyVaultName] = keyVault.Data.Name; 354private static void PopulateWellKnownParameters(AzureBicepResource resource, ProvisioningContext context) 356if (resource.Parameters.TryGetValue(AzureBicepResource.KnownParameters.PrincipalId, out var principalId) && principalId is null) 358resource.Parameters[AzureBicepResource.KnownParameters.PrincipalId] = context.Principal.Id; 361if (resource.Parameters.TryGetValue(AzureBicepResource.KnownParameters.PrincipalName, out var principalName) && principalName is null) 363resource.Parameters[AzureBicepResource.KnownParameters.PrincipalName] = context.Principal.Name; 366if (resource.Parameters.TryGetValue(AzureBicepResource.KnownParameters.PrincipalType, out var principalType) && principalType is null) 368resource.Parameters[AzureBicepResource.KnownParameters.PrincipalType] = "User"; 371if (resource.Parameters.TryGetValue(AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId, out var logAnalyticsWorkspaceId) && logAnalyticsWorkspaceId is null) 374resource.Parameters.Remove(AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId); 378resource.Parameters[AzureBicepResource.KnownParameters.Location] = context.Location.Name; 423internal static string GetChecksum(AzureBicepResource resource, JsonObject parameters) 437internal static async ValueTask<string?> GetCurrentChecksumAsync(AzureBicepResource resource, IConfiguration section, CancellationToken cancellationToken = default) 472AzureBicepResource.KnownParameters.PrincipalName, 473AzureBicepResource.KnownParameters.PrincipalId, 474AzureBicepResource.KnownParameters.PrincipalType, 475AzureBicepResource.KnownParameters.KeyVaultName, 476AzureBicepResource.KnownParameters.Location, 477AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId, 481internal static async Task SetParametersAsync(JsonObject parameters, AzureBicepResource resource, bool skipDynamicValues = false, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.AppConfiguration (2)
AzureAppConfigurationExtensions.cs (2)
38var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 40var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
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 (2)
AzureApplicationInsightsExtensions.cs (2)
64appInsights.WorkspaceResourceId = logAnalyticsWorkspace.Resource.WorkspaceId.AsProvisioningParameter(infrastructure, AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId); 88var logAnalyticsWorkspaceParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.LogAnalyticsWorkspaceId, typeof(string));
Aspire.Hosting.Azure.CognitiveServices (2)
AzureOpenAIExtensions.cs (2)
52var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 54var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
36var kvNameParam = new ProvisioningParameter(AzureBicepResource.KnownParameters.KeyVaultName, typeof(string));
Aspire.Hosting.Azure.EventHubs (2)
AzureEventHubsExtensions.cs (2)
50var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 52var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
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 (2)
AzureKeyVaultResourceExtensions.cs (2)
51var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 53var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
Aspire.Hosting.Azure.PostgreSQL (5)
AzurePostgresExtensions.cs (5)
19private static IResourceBuilder<T> WithLoginAndPassword<T>(this IResourceBuilder<T> builder, PostgresServerResource postgresResource) where T : AzureBicepResource 433var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 435var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 437var principalNameParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalName, typeof(string)); 463private static ParameterResource CreateDefaultUserNameParameter<T>(IResourceBuilder<T> builder) where T : AzureBicepResource
Aspire.Hosting.Azure.Redis (4)
AzureRedisExtensions.cs (4)
38var kvNameParam = new ProvisioningParameter(AzureBicepResource.KnownParameters.KeyVaultName, typeof(string)); 225var kvNameParam = new ProvisioningParameter(AzureBicepResource.KnownParameters.KeyVaultName, typeof(string)); 251var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 253var principalNameParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalName, typeof(string));
Aspire.Hosting.Azure.Search (2)
AzureSearchExtensions.cs (2)
44var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 46var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
Aspire.Hosting.Azure.ServiceBus (2)
AzureServiceBusExtensions.cs (2)
45var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 47var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
Aspire.Hosting.Azure.SignalR (2)
AzureSignalRExtensions.cs (2)
51var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 53var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
Aspire.Hosting.Azure.Sql (3)
AzureSqlExtensions.cs (3)
198var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); 200var principalNameParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalName, typeof(string)); 232var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string));
Aspire.Hosting.Azure.Storage (2)
AzureStorageExtensions.cs (2)
61var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 63var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
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 (2)
AzureWebPubSubExtensions.cs (2)
58var principalTypeParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalType, typeof(string)); 60var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
BicepSample.AppHost (1)
Program.cs (1)
10AzureBicepResource? temp00 = null;