When attempting to deploy an Azure Container App using Terraform, I encounter the error message:
Cannot remove secrets from Container Apps at this time due to a limitation in the Container Apps Service. Please see https://github.com/microsoft/azure-container-apps/issues/395 for more details.
Despite not attempting to directly modify any secrets, I'm unable to proceed with the deployment. The closed issue they are mentioning here seems to be related to the problem. But didn't help much. This is something that suddenly started happening without any changes to the code as well.
I'm using the terraform version - 3.101.0
resource "azurerm_container_app" "container_app" {
name = var.app_name
container_app_environment_id = var.ca_environment
resource_group_name = var.resource_group_name
revision_mode = "Single"
ingress {
external_enabled = true
target_port = var.port
traffic_weight {
percentage = 100
latest_revision = true
}
}
secret {
name = "container-registry-password"
value = var.registry_credentials.registry_key
}
registry {
server = var.registry_credentials.registry_server_url
username = var.registry_credentials.registry_username
password_secret_name = "container-registry-password"
}
template {
container {
name = "app-container"
image = "${var.registry_credentials.registry_server_url}/${var.image_name}:latest"
cpu = 1
memory = "2Gi"
dynamic "env" {
for_each = var.configs
content {
name = env.value.name
value = env.value.value
}
}
liveness_probe {
transport = "HTTP"
path = var.liveness_path
port = var.port
initial_delay = 30
interval_seconds = 30
timeout = 15
failure_count_threshold = 3
}
}
min_replicas = 1
max_replicas = 3
}
}
How can I get this issue resolved?

