Bug updating Environment variable in azurerm container app

In my release pipeline, I’ve got a terraform file in which the backend(container apps + gateway etc) is made. This is made with azurerm.

In the release pipeline, the container apps are first updated(depending upon a new build which is available or not). the container app is initially updated and a scan is made before if there is a new image available in the registry.

Below a picture of a small part of the code;

If the environment variable with the URL is changed(so a new revision is made for that specific container which is linked) a error occurs in the azurerm saying:

Is there a solution for updating a environment variable of a existing container, so that I can use it in my release pipeline(when a new image is released in the container app → revision url changes).