-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCKER_REGISTRY_SERVER_URL re-applied in every run #22379
Comments
I seem to have the same/a similar problem: #22003 (comment) |
Thanks @SebastianBalle for raising this issue. Can you try putting the docker registry URL in app_setting like below code and try apply again?
|
We are using Azure Container Registry for storing our images so or configuration looks as following: app_settings = {
"DOCKER_REGISTRY_SERVER_URL" = "${azurerm_container_registry.acr.name}.azurecr.io"
"DOCKER_REGISTRY_SERVER_USERNAME" = [Not configured using Terraform]
"DOCKER_REGISTRY_SERVER_PASSWORD" = [Not configured using Terraform]
} I tried adding the HTTPS protocol in from of the URL for ACR but this resulted in the same outcome. Does the setting lifecycle {
ignore_changes = [
app_settings["DOCKER_REGISTRY_SERVER_URL"],
]
} until #22484 has been merged and released. |
@SebastianBalle Thanks for the feedbacks, I don't think this behavior is relate to the |
Yes the |
@SebastianBalle so whatever value changed to the |
@xiaxyi The configuration is changed in Azure Portal. The functionality remained the same with or without the HTTPS protocol. |
I just tried updating to the recently released 3.74 and removed our workwaround and it worked exactly as hoped. Thanks a lot for fixing this! |
Didn't work for me unfortunately with 3.74. As soon as |
Hi @cleverer , Thanks for the feedback, can you let me know what setting was changed in the |
It doesn't matter, you can change any app settings. I created a minimal reproduction config: https://github.com/Contactify-AG/terraform-bug-reproduction |
We observe similar behaviour as @cleverer - one change in app settings and docker settings are gone |
We have a similar issue. |
Same issue here. Always says:
Plan: 0 to add, 2 to change, 0 to destroy. I apply and then nothing is changed as it should. |
Same issue always tries to reapply: ~ app_settings = {
+ "DOCKER_REGISTRY_SERVER_PASSWORD" = "[MASKED]"
+ "DOCKER_REGISTRY_SERVER_USERNAME" = "registry" Plan: 0 to add, 2 to change, 0 to destroy. I apply and then nothing is changed as it should. then run ❯ az webapp config appsettings list --name <web app> --resource-group <resource group>
[
{
"name": "DOCKER_CUSTOM_IMAGE_NAME",
"slotSetting": false,
"value": "registryname.azurecr.io/containername:latest"
},
{
"name": "DOCKER_REGISTRY_SERVER_PASSWORD",
"slotSetting": false,
"value": null <== always null, no matter how many times I apply
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"slotSetting": false,
"value": "https://registryname.azurecr.io"
},
{
"name": "DOCKER_REGISTRY_SERVER_USERNAME",
"slotSetting": false,
"value": "registryusername"
},
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"slotSetting": false,
"value": "false"
},
{
"name": "WEBSITES_PORT",
"slotSetting": false,
"value": "80"
},
{
"name": "WEBSITE_HEALTHCHECK_MAXPINGFAILURES",
"slotSetting": false,
"value": "0"
}
] |
Still encounter the same error in |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.5.1
AzureRM Provider Version
3.63.0
Affected Resource(s)/Data Source(s)
azurerm_linux_web_app
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
I would expect the
DOCKER_REGISTRY_SERVER_URL
to be saved correctly in the state so it does not re-apply the change to the App Service over and over again.Recently switched from old config
Actual Behaviour
Terraform applies the application setting even if it already exists.
Steps to Reproduce
terraform apply
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: