51 references to _options
Aspire.Hosting.Azure (51)
Provisioning\Internal\BaseProvisioningContextProvider.cs (14)
80
var subscriptionId =
_options
.SubscriptionId ?? throw new MissingConfigurationException("An Azure subscription id is required. Set the Azure:SubscriptionId configuration value.");
96
if (string.IsNullOrEmpty(
_options
.Location))
107
if (string.IsNullOrEmpty(
_options
.ResourceGroup))
119
resourceGroupName =
_options
.ResourceGroup;
120
createIfAbsent =
_options
.AllowResourceGroupCreation ?? false;
127
_options
.AllowResourceGroupCreation = true;
134
var location = new AzureLocation(
_options
.Location);
165
azureSection["Location"] =
_options
.Location;
166
azureSection["SubscriptionId"] =
_options
.SubscriptionId;
168
if (!string.IsNullOrEmpty(
_options
.TenantId))
170
azureSection["TenantId"] =
_options
.TenantId;
172
if (
_options
.AllowResourceGroupCreation.HasValue)
174
azureSection["AllowResourceGroupCreation"] =
_options
.AllowResourceGroupCreation.Value;
271
return await TryGetSubscriptionsAsync(
_options
.TenantId, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (20)
47
if (!string.IsNullOrWhiteSpace(
_options
.ResourceGroupPrefix))
49
prefix =
_options
.ResourceGroupPrefix;
85
while (
_options
.Location == null ||
_options
.SubscriptionId == null)
88
if (
_options
.TenantId == null &&
_options
.SubscriptionId == null)
91
if (
_options
.TenantId == null)
97
if (
_options
.SubscriptionId == null)
100
if (
_options
.SubscriptionId == null)
106
if (
_options
.Location == null)
109
if (
_options
.Location == null)
177
_options
.TenantId = result.Data[TenantName].Value;
212
_options
.TenantId = manualResult.Data[TenantName].Value;
233
(subscriptionOptions, fetchSucceeded) = await TryGetSubscriptionsAsync(
_options
.TenantId, cancellationToken).ConfigureAwait(false);
276
_options
.SubscriptionId = result.Data[SubscriptionIdName].Value;
311
_options
.SubscriptionId = manualResult.Data[SubscriptionIdName].Value;
332
(locationOptions, fetchSucceeded) = await TryGetLocationsAsync(
_options
.SubscriptionId!, cancellationToken).ConfigureAwait(false);
389
_options
.Location = result.Data[LocationName].Value;
390
_options
.ResourceGroup = result.Data[ResourceGroupName].Value;
391
_options
.AllowResourceGroupCreation = true;
Provisioning\Internal\RunModeProvisioningContextProvider.cs (17)
46
if (!string.IsNullOrWhiteSpace(
_options
.ResourceGroupPrefix))
48
prefix =
_options
.ResourceGroupPrefix;
68
(!string.IsNullOrEmpty(
_options
.Location) && !string.IsNullOrEmpty(
_options
.SubscriptionId)))
104
while (
_options
.Location == null ||
_options
.SubscriptionId == null)
129
if (string.IsNullOrEmpty(
_options
.SubscriptionId))
161
InputType = string.IsNullOrEmpty(
_options
.SubscriptionId) ? InputType.Choice : InputType.Text,
166
Disabled = !string.IsNullOrEmpty(
_options
.SubscriptionId),
167
Value =
_options
.SubscriptionId,
172
if (!string.IsNullOrEmpty(
_options
.SubscriptionId))
189
DependsOnInputs = string.IsNullOrEmpty(
_options
.SubscriptionId) ? [TenantName] : []
264
_options
.TenantId = tenantInput.Value;
266
_options
.Location = result.Data[LocationName].Value;
267
_options
.SubscriptionId ??= result.Data[SubscriptionIdName].Value;
268
_options
.ResourceGroup = result.Data[ResourceGroupName].Value;
269
_options
.AllowResourceGroupCreation = true; // Allow the creation of the resource group if it does not exist.