2 writes to Subscription
Aspire.Hosting.Azure (2)
AzureBicepResourceScope.cs (2)
33
Subscription
= subscription;
55
Subscription
= subscription;
22 references to Subscription
Aspire.Hosting.Azure (19)
AzureBicepResource.cs (1)
286
WriteScopeValue(context, "subscription", Scope.
Subscription
);
AzureProvisioningResource.cs (10)
270
if (annotationScope is { HasResourceGroup: true,
Subscription
: null } &&
271
moduleScope?.
Subscription
is { } subscription)
284
ScopeValueEquals(expected.
Subscription
, actual.
Subscription
) &&
305
if (scope.HasResourceGroup && scope.
Subscription
is not null)
307
return (scope.
Subscription
, scope.ResourceGroup) switch
313
_ => throw new NotSupportedException($"Scope value types '{scope.
Subscription
.GetType()}' and '{scope.ResourceGroup.GetType()}' are not supported.")
327
if (scope.
Subscription
is not null)
329
return scope.
Subscription
switch
333
_ => throw new NotSupportedException($"Subscription type '{scope.
Subscription
.GetType()}' is not supported.")
AzurePublishingContext.cs (5)
218
await VisitAsync(scope.
Subscription
, MapParameterAsync, cancellationToken).ConfigureAwait(false);
358
if (scope.HasResourceGroup && scope.
Subscription
is not null)
362
ResolveValue(Eval(scope.
Subscription
)).Compile(),
371
if (scope.
Subscription
is not null)
373
return new FunctionCallExpression(new IdentifierExpression("subscription"), ResolveValue(Eval(scope.
Subscription
)).Compile());
Provisioning\BicepUtilities.cs (1)
112
await SetScopeValueAsync(scope, "subscription", targetScope.
Subscription
, cancellationToken).ConfigureAwait(false);
Provisioning\Provisioners\BicepProvisioner.cs (2)
511
targetScope is {
Subscription
: not null, HasResourceGroup: false };
513
if (targetScope?.
Subscription
is { } existingSubscription)
Aspire.Hosting.Azure.Kubernetes.Tests (2)
AzureKubernetesEnvironmentExtensionsTests.cs (2)
604
inheritedSubscription ? supportingScope.
Subscription
: builder.Resources.OfType<ParameterResource>().Single(parameter => parameter.Name == "cluster-subscription"),
605
roles.Resource.Scope.
Subscription
);
Aspire.Hosting.Azure.Tests (1)
BicepUtilitiesTests.cs (1)
64
Assert.Equal("existing-subscription", roles.Scope.
Subscription
);