93 references to _options
Aspire.Hosting.Azure (93)
Provisioning\Internal\BaseProvisioningContextProvider.cs (15)
93var subscriptionId = _options.SubscriptionId ?? throw new MissingConfigurationException("An Azure subscription id is required. Set the Azure:SubscriptionId configuration value."); 109if (string.IsNullOrEmpty(_options.Location)) 127if (string.IsNullOrEmpty(_options.ResourceGroup)) 139resourceGroupName = _options.ResourceGroup; 140createIfAbsent = _options.AllowResourceGroupCreation ?? false; 147_options.AllowResourceGroupCreation = true; 154var location = new AzureLocation(_options.Location); 194tenantResource.TenantId?.ToString() ?? _options.TenantId, 215await SaveProvisioningOptionsAsync(resourceGroupName, _options.TenantId, tenantDomain: null, azureStateSection, cancellationToken).ConfigureAwait(false); 226azureSection["Location"] = _options.Location; 227azureSection["SubscriptionId"] = _options.SubscriptionId; 229if (_options.TenantResourceSuffix is { } tenantResourceSuffix) 253if (_options.AllowResourceGroupCreation.HasValue) 255azureSection["AllowResourceGroupCreation"] = _options.AllowResourceGroupCreation.Value; 340return await TryGetSubscriptionsAsync(_options.TenantId, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (25)
44if (!string.IsNullOrWhiteSpace(_options.ResourceGroupPrefix)) 46prefix = _options.ResourceGroupPrefix; 82while (_options.Location == null || _options.SubscriptionId == null) 85if (_options.TenantId == null && _options.SubscriptionId == null) 88if (_options.TenantId == null) 94if (_options.SubscriptionId == null) 97if (_options.SubscriptionId == null) 103if (_options.Location == null) 106if (_options.Location == null) 113if (_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)
50if (!string.IsNullOrWhiteSpace(_options.ResourceGroupPrefix)) 52prefix = _options.ResourceGroupPrefix; 143if (string.IsNullOrEmpty(_options.ResourceGroup)) 145_options.ResourceGroup = GetDefaultResourceGroupName(); 146_options.AllowResourceGroupCreation ??= true; 149await 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; 287while (forcePrompt || _options.Location == null || _options.SubscriptionId == null) 342var includeTenantInput = forcePrompt || string.IsNullOrEmpty(_options.SubscriptionId); 354Value = _options.TenantId, 371var allowSubscriptionEdit = forcePrompt || string.IsNullOrEmpty(_options.SubscriptionId); 381Value = _options.SubscriptionId, 390: _options.TenantId; 415Value = _options.ResourceGroup ?? (useTextResourceGroupInput ? GetDefaultResourceGroupName() : null), 456Value = _options.Location, 495Value = _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;