52 references to _options
Aspire.Hosting.Azure (52)
Provisioning\Internal\BaseProvisioningContextProvider.cs (14)
80var subscriptionId = _options.SubscriptionId ?? throw new MissingConfigurationException("An Azure subscription id is required. Set the Azure:SubscriptionId configuration value."); 96if (string.IsNullOrEmpty(_options.Location)) 107if (string.IsNullOrEmpty(_options.ResourceGroup)) 119resourceGroupName = _options.ResourceGroup; 120createIfAbsent = _options.AllowResourceGroupCreation ?? false; 127_options.AllowResourceGroupCreation = true; 134var location = new AzureLocation(_options.Location); 165azureSection["Location"] = _options.Location; 166azureSection["SubscriptionId"] = _options.SubscriptionId; 168if (!string.IsNullOrEmpty(_options.TenantId)) 170azureSection["TenantId"] = _options.TenantId; 172if (_options.AllowResourceGroupCreation.HasValue) 174azureSection["AllowResourceGroupCreation"] = _options.AllowResourceGroupCreation.Value; 271return await TryGetSubscriptionsAsync(_options.TenantId, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (23)
46if (!string.IsNullOrWhiteSpace(_options.ResourceGroupPrefix)) 48prefix = _options.ResourceGroupPrefix; 84while (_options.Location == null || _options.SubscriptionId == null) 87if (_options.TenantId == null && _options.SubscriptionId == null) 90if (_options.TenantId == null) 96if (_options.SubscriptionId == null) 99if (_options.SubscriptionId == null) 105if (_options.Location == null) 108if (_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)
46if (!string.IsNullOrWhiteSpace(_options.ResourceGroupPrefix)) 48prefix = _options.ResourceGroupPrefix; 68(!string.IsNullOrEmpty(_options.Location) && !string.IsNullOrEmpty(_options.SubscriptionId))) 104while (_options.Location == null || _options.SubscriptionId == null) 129if (string.IsNullOrEmpty(_options.SubscriptionId)) 159if (string.IsNullOrEmpty(_options.SubscriptionId)) 183InputType = string.IsNullOrEmpty(_options.SubscriptionId) ? InputType.Choice : InputType.Text, 189Value = _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.