52 references to _options
Aspire.Hosting.Azure (52)
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 (23)
46
if (!string.IsNullOrWhiteSpace(
_options
.ResourceGroupPrefix))
48
prefix =
_options
.ResourceGroupPrefix;
84
while (
_options
.Location == null ||
_options
.SubscriptionId == null)
87
if (
_options
.TenantId == null &&
_options
.SubscriptionId == null)
90
if (
_options
.TenantId == null)
96
if (
_options
.SubscriptionId == null)
99
if (
_options
.SubscriptionId == null)
105
if (
_options
.Location == null)
108
if (
_options
.Location == null)
176
_options
.TenantId = result.Data[TenantName].Value;
211
_options
.TenantId = manualResult.Data[TenantName].Value;
232
(subscriptionOptions, fetchSucceeded) = await TryGetSubscriptionsAsync(
_options
.TenantId, cancellationToken).ConfigureAwait(false);
275
_options
.SubscriptionId = result.Data[SubscriptionIdName].Value;
310
_options
.SubscriptionId = manualResult.Data[SubscriptionIdName].Value;
331
(resourceGroupOptions, resourceGroupFetchSucceeded) = await TryGetResourceGroupsWithLocationAsync(
_options
.SubscriptionId!, cancellationToken).ConfigureAwait(false);
390
_options
.ResourceGroup = selectedResourceGroup;
391
_options
.AllowResourceGroupCreation = true;
399
_options
.Location = existingResourceGroup.Value.Location;
400
_logger.LogInformation("Using location {location} from existing resource group {resourceGroup}",
_options
.Location, selectedResourceGroup);
426
(locationOptions, locationFetchSucceeded) = await TryGetLocationsAsync(
_options
.SubscriptionId!, cancellationToken).ConfigureAwait(false);
467
_options
.Location = locationResult.Data[LocationName].Value;
Provisioning\Internal\RunModeProvisioningContextProvider.cs (15)
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))
159
if (string.IsNullOrEmpty(
_options
.SubscriptionId))
183
InputType = string.IsNullOrEmpty(
_options
.SubscriptionId) ? InputType.Choice : InputType.Text,
189
Value =
_options
.SubscriptionId,
304
_options
.TenantId = tenantInput.Value;
306
_options
.Location = result.Data[LocationName].Value;
307
_options
.SubscriptionId ??= result.Data[SubscriptionIdName].Value;
308
_options
.ResourceGroup = result.Data[ResourceGroupName].Value;
309
_options
.AllowResourceGroupCreation = true; // Allow the creation of the resource group if it does not exist.