Azure / Azure/container-apps-deploy-pipelines-task

Can't seem to deploy a container from an ACR outside of the sub with credentials

Open
#13 3 comments 0 reactions 1 assignee Claimed by @cormacpayne View on GitHub
Dominant language
TypeScript
Stars
6
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Hi,

We have an ACR in a totally different subscription to the ACA environment. For example

Subscription: Shared Services
RG: rg-sharedservices
ACR: acrsharedservices.azurecr.io

Subscription: MyApplication
RG: rg-myapp
Env: aca-myenv-myapp
ImageToDeply: acrsharedservices.azurecr.io/mycompany.myapp:1.0

This is because a couple of reasons:
- You look for the acr inside the sub passed in for the ACA when
- We cant use ACR username and ACR password without acrname because it tries to login to undefined.azureacr.io
- We cant set the env variable of CA_ADO_TASK_ACR_ACCESS_TOKEN with the key without a login failure

Here's the various combos we've tried:

```
- task: AzureContainerAppsRC@0
displayName: "Deploying Container"
env:
CA_ADO_TASK_ACR_ACCESS_TOKEN: "{{parameters.acrAccessKey}}"
inputs:
azureSubscription: "${{parameters.appServiceConnectionName}}"
acrName: "${{parameters.acrName}}"
# acrUsername: "${{parameters.acrUserName}}"
# acrPassword: "${{parameters.acrAccessKey}}"
containerAppName: "${{parameters.containerAppName}}"
containerAppEnvironment: "${{parameters.containerAppEnvironment}}"
imageToDeploy: "${{parameters.acrName}}.azurecr.io/${{parameters.containerName}}:${{parameters.containerTag}}"
targetPort: "443"
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.