83 references to _options
Aspire.Hosting.Azure (83)
Provisioning\Internal\BaseProvisioningContextProvider.cs (14)
93
var subscriptionId =
_options
.SubscriptionId ?? throw new MissingConfigurationException("An Azure subscription id is required. Set the Azure:SubscriptionId configuration value.");
109
if (string.IsNullOrEmpty(
_options
.Location))
120
if (string.IsNullOrEmpty(
_options
.ResourceGroup))
132
resourceGroupName =
_options
.ResourceGroup;
133
createIfAbsent =
_options
.AllowResourceGroupCreation ?? false;
140
_options
.AllowResourceGroupCreation = true;
147
var location = new AzureLocation(
_options
.Location);
187
tenantResource.TenantId?.ToString() ??
_options
.TenantId,
208
await SaveProvisioningOptionsAsync(resourceGroupName,
_options
.TenantId, tenantDomain: null, azureStateSection, cancellationToken).ConfigureAwait(false);
219
azureSection["Location"] =
_options
.Location;
220
azureSection["SubscriptionId"] =
_options
.SubscriptionId;
241
if (
_options
.AllowResourceGroupCreation.HasValue)
243
azureSection["AllowResourceGroupCreation"] =
_options
.AllowResourceGroupCreation.Value;
328
return await TryGetSubscriptionsAsync(
_options
.TenantId, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (23)
45
if (!string.IsNullOrWhiteSpace(
_options
.ResourceGroupPrefix))
47
prefix =
_options
.ResourceGroupPrefix;
83
while (
_options
.Location == null ||
_options
.SubscriptionId == null)
86
if (
_options
.TenantId == null &&
_options
.SubscriptionId == null)
89
if (
_options
.TenantId == null)
95
if (
_options
.SubscriptionId == null)
98
if (
_options
.SubscriptionId == null)
104
if (
_options
.Location == null)
107
if (
_options
.Location == null)
175
_options
.TenantId = result.Data[TenantName].Value;
210
_options
.TenantId = manualResult.Data[TenantName].Value;
231
(subscriptionOptions, fetchSucceeded) = await TryGetSubscriptionsAsync(
_options
.TenantId, cancellationToken).ConfigureAwait(false);
274
_options
.SubscriptionId = result.Data[SubscriptionIdName].Value;
309
_options
.SubscriptionId = manualResult.Data[SubscriptionIdName].Value;
330
(resourceGroupOptions, resourceGroupFetchSucceeded) = await TryGetResourceGroupsWithLocationAsync(
_options
.SubscriptionId!, cancellationToken).ConfigureAwait(false);
389
_options
.ResourceGroup = selectedResourceGroup;
390
_options
.AllowResourceGroupCreation = true;
398
_options
.Location = existingResourceGroup.Value.Location;
399
_logger.LogInformation("Using location {location} from existing resource group {resourceGroup}",
_options
.Location, selectedResourceGroup);
425
(locationOptions, locationFetchSucceeded) = await TryGetLocationsAsync(
_options
.SubscriptionId!, cancellationToken).ConfigureAwait(false);
466
_options
.Location = locationResult.Data[LocationName].Value;
Provisioning\Internal\RunModeProvisioningContextProvider.cs (46)
50
if (!string.IsNullOrWhiteSpace(
_options
.ResourceGroupPrefix))
52
prefix =
_options
.ResourceGroupPrefix;
143
if (string.IsNullOrEmpty(
_options
.ResourceGroup))
145
_options
.ResourceGroup = GetDefaultResourceGroupName();
146
_options
.AllowResourceGroupCreation ??= true;
149
await SaveProvisioningOptionsAsync(
_options
.ResourceGroup, cancellationToken).ConfigureAwait(false);
162
_options
.SubscriptionId = options.SubscriptionId;
167
_options
.ResourceGroup = options.ResourceGroup;
172
_options
.Location = options.Location;
175
_options
.TenantId = string.IsNullOrWhiteSpace(options.TenantId) ? null : options.TenantId;
177
_options
.AllowResourceGroupCreation = true;
187
_options
.SubscriptionId,
188
_options
.ResourceGroup,
189
_options
.Location,
190
_options
.TenantId);
205
_options
.SubscriptionId,
206
_options
.ResourceGroup,
207
_options
.Location,
208
_options
.TenantId);
217
!string.IsNullOrEmpty(
_options
.Location) &&
218
!string.IsNullOrEmpty(
_options
.SubscriptionId);
229
_options
.ResourceGroupPrefix = _configuredOptions.ResourceGroupPrefix;
230
_options
.AllowResourceGroupCreation = _configuredOptions.AllowResourceGroupCreation;
231
_options
.Location = _configuredOptions.Location;
232
_options
.SubscriptionId = _configuredOptions.SubscriptionId;
233
_options
.ResourceGroup = _configuredOptions.ResourceGroup;
234
_options
.TenantId = _configuredOptions.TenantId;
239
_options
.Location = location;
244
_options
.SubscriptionId = subscriptionId;
249
_options
.ResourceGroup = resourceGroup;
254
_options
.TenantId = tenantId;
259
_options
.AllowResourceGroupCreation = allowResourceGroupCreation;
276
while (forcePrompt ||
_options
.Location == null ||
_options
.SubscriptionId == null)
331
var includeTenantInput = forcePrompt || string.IsNullOrEmpty(
_options
.SubscriptionId);
343
Value =
_options
.TenantId,
360
var allowSubscriptionEdit = forcePrompt || string.IsNullOrEmpty(
_options
.SubscriptionId);
370
Value =
_options
.SubscriptionId,
379
:
_options
.TenantId;
404
Value =
_options
.ResourceGroup ?? (useTextResourceGroupInput ? GetDefaultResourceGroupName() : null),
445
Value =
_options
.Location,
483
_options
.TenantId = tenantInput.Value;
486
_options
.Location = inputs[LocationName].Value;
487
_options
.SubscriptionId = inputs[SubscriptionIdName].Value;
488
_options
.ResourceGroup = inputs[ResourceGroupName].Value;
489
_options
.AllowResourceGroupCreation = true;