1 write to TargetResource
Aspire.Hosting.Azure.Sandboxes (1)
AzureSandboxContainerResource.cs (1)
21
TargetResource
= targetResource;
32 references to TargetResource
Aspire.Hosting.Azure.Sandboxes (30)
AzureSandboxContainerDeployment.cs (25)
49
Description = $"Deploys compute resource '{resource.
TargetResource
.Name}' to ACA sandbox '{resource.Name}'.",
126
var pushSteps = context.GetSteps(resource.
TargetResource
, WellKnownPipelineTags.PushContainerImage);
137
var dependencies = await resource.
TargetResource
.GetResourceDependenciesAsync(
150
$"Azure sandbox resource '{resource.
TargetResource
.Name}' in sandbox group '{resource.Parent.Name}' references resource '{dependency.Name}' in sandbox group '{producer.Parent.Name}', but cross-group sandbox references are not supported. Deploy both resources to the same sandbox group.");
161
$"Azure sandbox resources '{resource.
TargetResource
.Name}' and '{producer.
TargetResource
.Name}' have a circular deployment dependency.");
221
var targetResource = resource.
TargetResource
;
558
["aspire-source"] = resource.
TargetResource
.Name,
565
var options = GetAzureSandboxContainerOptions(resource.
TargetResource
);
792
var options = GetAzureSandboxContainerOptions(resource.
TargetResource
);
939
if (resource.
TargetResource
.RequiresImageBuildAndPush())
941
var containerImageReference = new ContainerImageReference(resource.
TargetResource
);
943
.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext, Caller = resource.
TargetResource
}, context.CancellationToken)
945
?? throw new InvalidOperationException($"Could not resolve the pushed container image for resource '{resource.
TargetResource
.Name}'.");
948
if (resource.
TargetResource
.TryGetContainerImageName(out var imageName))
953
throw new NotSupportedException($"Resource '{resource.
TargetResource
.Name}' cannot be deployed to Azure sandbox group '{resource.Parent.Name}' because it does not produce or reference a container image.");
1435
var options = GetAzureSandboxContainerOptions(resource.
TargetResource
);
1441
foreach (var resolvedEndpoint in resource.
TargetResource
.ResolveEndpoints())
1450
throw new InvalidOperationException($"Endpoint '{resolvedEndpoint.Endpoint.Name}' on resource '{resource.
TargetResource
.Name}' does not have a target port. Configure a target port before deploying it to an Azure sandbox.");
1453
var protocol = ResolveSandboxPortProtocol(resource.
TargetResource
, resolvedEndpoint.Endpoint);
1469
throw new NotSupportedException($"Endpoint '{resolvedEndpoint.Endpoint.Name}' on resource '{resource.
TargetResource
.Name}' shares target port {targetPort} with endpoint '{existingEndpoint.Name}' but uses a different transport. Azure sandbox ports support a single HTTP protocol per target port.");
1474
throw new NotSupportedException($"Endpoint '{resolvedEndpoint.Endpoint.Name}' on resource '{resource.
TargetResource
.Name}' shares target port {targetPort} with endpoint '{existingEndpoint.Name}' but configures a different anonymous-access policy. Azure sandbox ports support a single access policy per target port.");
1491
throw new InvalidOperationException($"Resource '{resource.
TargetResource
.Name}' has Azure sandbox endpoint options for endpoint(s) that are not exposed by EndpointAnnotation: {string.Join(", ", unmatchedEndpointOptions)}.");
2024
stateSection.Data["SourceResourceName"] ??= resource.
TargetResource
.Name;
2144
return GetAzureSandboxContainerOptions(resource.
TargetResource
)?.PublicEndpointReadyTimeout ??
AzureSandboxEndpointPropertyValueProvider.cs (5)
32
throw new InvalidOperationException($"Endpoint '{endpoint.Name}' on resource '{resource.
TargetResource
.Name}' is not external. Azure sandbox endpoint references are only supported for external HTTP endpoints because ADC only assigns public URLs to exposed ports.");
96
throw new InvalidOperationException($"Azure sandbox deployment state for resource '{_resource.
TargetResource
.Name}' endpoint '{_endpointReferenceExpression.Endpoint.EndpointName}' contains invalid URL '{url}'.");
113
new($"Azure sandbox endpoint '{_endpointReferenceExpression.Endpoint.EndpointName}' on resource '{_resource.
TargetResource
.Name}' does not have a deployed URL yet. Runtime sandbox URLs cannot be used as first-pass Azure provisioning values; deploy the producing sandbox before resolving this reference.");
177
throw new InvalidOperationException($"Endpoint '{endpointName}' on resource '{resource.
TargetResource
.Name}' is not exposed by the Azure sandbox deployment target. Configure it as an external HTTP endpoint before referencing its sandbox URL.");
182
foreach (var resolvedEndpoint in resource.
TargetResource
.ResolveEndpoints())
Aspire.Hosting.Azure.Tests (2)
AzureSandboxesTests.cs (2)
2203
Assert.Same(computeResource, sandboxContainer.
TargetResource
);
2362
Assert.Same(computeResource, sandboxContainer.
TargetResource
);