93 references to _options
Aspire.Hosting.Azure (93)
Provisioning\Internal\BaseProvisioningContextProvider.cs (15)
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))
127
if (string.IsNullOrEmpty(
_options
.ResourceGroup))
139
resourceGroupName =
_options
.ResourceGroup;
140
createIfAbsent =
_options
.AllowResourceGroupCreation ?? false;
147
_options
.AllowResourceGroupCreation = true;
154
var location = new AzureLocation(
_options
.Location);
194
tenantResource.TenantId?.ToString() ??
_options
.TenantId,
215
await SaveProvisioningOptionsAsync(resourceGroupName,
_options
.TenantId, tenantDomain: null, azureStateSection, cancellationToken).ConfigureAwait(false);
226
azureSection["Location"] =
_options
.Location;
227
azureSection["SubscriptionId"] =
_options
.SubscriptionId;
229
if (
_options
.TenantResourceSuffix is { } tenantResourceSuffix)
253
if (
_options
.AllowResourceGroupCreation.HasValue)
255
azureSection["AllowResourceGroupCreation"] =
_options
.AllowResourceGroupCreation.Value;
340
return await TryGetSubscriptionsAsync(
_options
.TenantId, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (25)
44
if (!string.IsNullOrWhiteSpace(
_options
.ResourceGroupPrefix))
46
prefix =
_options
.ResourceGroupPrefix;
82
while (
_options
.Location == null ||
_options
.SubscriptionId == null)
85
if (
_options
.TenantId == null &&
_options
.SubscriptionId == null)
88
if (
_options
.TenantId == null)
94
if (
_options
.SubscriptionId == null)
97
if (
_options
.SubscriptionId == null)
103
if (
_options
.Location == null)
106
if (
_options
.Location == null)
113
if (
_options
.TenantResourceSuffix is null &&
142
_options
.TenantResourceSuffix = result.Data[TenantResourceSuffixName].Value ?? string.Empty;
206
_options
.TenantId = result.Data[TenantName].Value;
241
_options
.TenantId = manualResult.Data[TenantName].Value;
262
(subscriptionOptions, fetchSucceeded) = await TryGetSubscriptionsAsync(
_options
.TenantId, cancellationToken).ConfigureAwait(false);
305
_options
.SubscriptionId = result.Data[SubscriptionIdName].Value;
340
_options
.SubscriptionId = manualResult.Data[SubscriptionIdName].Value;
361
(resourceGroupOptions, resourceGroupFetchSucceeded) = await TryGetResourceGroupsWithLocationAsync(
_options
.SubscriptionId!, cancellationToken).ConfigureAwait(false);
420
_options
.ResourceGroup = selectedResourceGroup;
421
_options
.AllowResourceGroupCreation = true;
429
_options
.Location = existingResourceGroup.Value.Location;
430
_logger.LogInformation("Using location {location} from existing resource group {resourceGroup}",
_options
.Location, selectedResourceGroup);
456
(locationOptions, locationFetchSucceeded) = await TryGetLocationsAsync(
_options
.SubscriptionId!, cancellationToken).ConfigureAwait(false);
497
_options
.Location = locationResult.Data[LocationName].Value;
Provisioning\Internal\RunModeProvisioningContextProvider.cs (53)
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;
178
_options
.TenantResourceSuffix = options.TenantResourceSuffix;
181
_options
.AllowResourceGroupCreation = true;
191
_options
.SubscriptionId,
192
_options
.ResourceGroup,
193
_options
.Location,
194
_options
.TenantId,
195
_options
.TenantResourceSuffix);
210
_options
.SubscriptionId,
211
_options
.ResourceGroup,
212
_options
.Location,
213
_options
.TenantId,
214
_options
.TenantResourceSuffix);
223
!string.IsNullOrEmpty(
_options
.Location) &&
224
!string.IsNullOrEmpty(
_options
.SubscriptionId);
235
_options
.ResourceGroupPrefix = _configuredOptions.ResourceGroupPrefix;
236
_options
.AllowResourceGroupCreation = _configuredOptions.AllowResourceGroupCreation;
237
_options
.Location = _configuredOptions.Location;
238
_options
.SubscriptionId = _configuredOptions.SubscriptionId;
239
_options
.ResourceGroup = _configuredOptions.ResourceGroup;
240
_options
.TenantId = _configuredOptions.TenantId;
241
_options
.TenantResourceSuffix = _configuredOptions.TenantResourceSuffix;
246
_options
.TenantResourceSuffix = tenantResourceSuffix;
250
_options
.Location = location;
255
_options
.SubscriptionId = subscriptionId;
260
_options
.ResourceGroup = resourceGroup;
265
_options
.TenantId = tenantId;
270
_options
.AllowResourceGroupCreation = allowResourceGroupCreation;
287
while (forcePrompt ||
_options
.Location == null ||
_options
.SubscriptionId == null)
342
var includeTenantInput = forcePrompt || string.IsNullOrEmpty(
_options
.SubscriptionId);
354
Value =
_options
.TenantId,
371
var allowSubscriptionEdit = forcePrompt || string.IsNullOrEmpty(
_options
.SubscriptionId);
381
Value =
_options
.SubscriptionId,
390
:
_options
.TenantId;
415
Value =
_options
.ResourceGroup ?? (useTextResourceGroupInput ? GetDefaultResourceGroupName() : null),
456
Value =
_options
.Location,
495
Value =
_options
.TenantResourceSuffix
506
_options
.TenantId = tenantInput.Value;
509
_options
.Location = inputs[LocationName].Value;
510
_options
.SubscriptionId = inputs[SubscriptionIdName].Value;
511
_options
.ResourceGroup = inputs[ResourceGroupName].Value;
514
_options
.TenantResourceSuffix = suffixInput.Value ?? string.Empty;
516
_options
.AllowResourceGroupCreation = true;