83 references to _options
Aspire.Hosting.Azure (83)
Provisioning\Internal\BaseProvisioningContextProvider.cs (14)
93var subscriptionId = _options.SubscriptionId ?? throw new MissingConfigurationException("An Azure subscription id is required. Set the Azure:SubscriptionId configuration value."); 109if (string.IsNullOrEmpty(_options.Location)) 120if (string.IsNullOrEmpty(_options.ResourceGroup)) 132resourceGroupName = _options.ResourceGroup; 133createIfAbsent = _options.AllowResourceGroupCreation ?? false; 140_options.AllowResourceGroupCreation = true; 147var location = new AzureLocation(_options.Location); 187tenantResource.TenantId?.ToString() ?? _options.TenantId, 208await SaveProvisioningOptionsAsync(resourceGroupName, _options.TenantId, tenantDomain: null, azureStateSection, cancellationToken).ConfigureAwait(false); 219azureSection["Location"] = _options.Location; 220azureSection["SubscriptionId"] = _options.SubscriptionId; 241if (_options.AllowResourceGroupCreation.HasValue) 243azureSection["AllowResourceGroupCreation"] = _options.AllowResourceGroupCreation.Value; 328return await TryGetSubscriptionsAsync(_options.TenantId, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (23)
45if (!string.IsNullOrWhiteSpace(_options.ResourceGroupPrefix)) 47prefix = _options.ResourceGroupPrefix; 83while (_options.Location == null || _options.SubscriptionId == null) 86if (_options.TenantId == null && _options.SubscriptionId == null) 89if (_options.TenantId == null) 95if (_options.SubscriptionId == null) 98if (_options.SubscriptionId == null) 104if (_options.Location == null) 107if (_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)
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; 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; 276while (forcePrompt || _options.Location == null || _options.SubscriptionId == null) 331var includeTenantInput = forcePrompt || string.IsNullOrEmpty(_options.SubscriptionId); 343Value = _options.TenantId, 360var allowSubscriptionEdit = forcePrompt || string.IsNullOrEmpty(_options.SubscriptionId); 370Value = _options.SubscriptionId, 379: _options.TenantId; 404Value = _options.ResourceGroup ?? (useTextResourceGroupInput ? GetDefaultResourceGroupName() : null), 445Value = _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;