Closed siddthota closed 4 years ago
Figured out a different way to solve it.
Now we are creating ACR/keyvault in the same file as App Service and using ${module.keyvalt.secret} and it works fine.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
Terraform (and AzureRM Provider) Version
Debug Output
2019-06-17 16:06:20.651 ERROR - Pulling docker image registry.azurecr.io/myApp-webapp:latest failed: 2019-06-17 16:06:20.651 INFO - Pulling image from Docker hub: registry.azurecr.io/myApp-webapp:latest 2019-06-17 16:06:20.676 ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://registry.azurecr.io/v2/myApp-webapp/manifests/latest: unauthorized: authentication required"}
2019-06-17 16:06:20.687 ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository)
Expected Behavior
To be able to pull image from KeyVault secret. I have set the ACR credentials to Keyvault and trying to access these secrets on Azure Webapp while pulling the image from ACR and getting the above error message.
Actual Behavior
I was able to retrieve the keys from Azure Powershell.
(Get-AzKeyVaultSecret -vaultName "myapp-kv-az" -name "myApp-pass-az-pass").SecretValueText
"Output - raw password stored on KV"
Steps to Reproduce
terraform apply
Terraform Script
App Service
Key Vault Module
References