azd used to return a useful, detailed error when deploying to an ACA resource that was improperly tagged:
ERROR: getting target resource: resource not found: unable to find a resource tagged with 'azd-service-name: CalculatorAgentLG'. Ensure the service resource is correctly tagged in your infrastructure configuration, and rerun provision
Now the error returned in this scenario is:
ERROR: failed deploying service 'CalculatorAgentLG': updating container app service: getting container app: getting container app: parameter containerAppName cannot be empty
I'm suspecting this might be a result of the changes in #5694 to swallow ResourceNotFound errors for Container App resources:
|
func (rm *resourceManager) resolveServiceResource( |
|
ctx context.Context, |
|
subscriptionId string, |
|
resourceGroupName string, |
|
serviceConfig *ServiceConfig, |
|
rerunCommand string, |
|
) (*azapi.ResourceExtended, error) { |
|
azureResource, err := rm.GetServiceResource(ctx, subscriptionId, resourceGroupName, serviceConfig, rerunCommand) |
|
|
|
// If the service target supports delayed provisioning, the resource isn't expected to be found yet. |
|
// Return the empty resource |
|
var resourceNotFoundError *azureutil.ResourceNotFoundError |
|
if err != nil && |
|
errors.As(err, &resourceNotFoundError) && |
|
ServiceTargetKind(serviceConfig.Host).SupportsDelayedProvisioning() { |
|
return &azapi.ResourceExtended{}, nil |
|
} |
|
|
|
if err != nil { |
|
return nil, err |
|
} |
azd used to return a useful, detailed error when deploying to an ACA resource that was improperly tagged:
Now the error returned in this scenario is:
I'm suspecting this might be a result of the changes in #5694 to swallow ResourceNotFound errors for Container App resources:
azure-dev/cli/azd/pkg/project/resource_manager.go
Lines 234 to 254 in 4170334