Configure Source Control (SCM) for azurerm_app_service


I have currently configured a web app service in Azure via Terraform. One option is site_config > scm_type ( What is the recommended way to specify the repo URL and branch for this newly created app?



Hello @mskccdanielm1!

Have you tried the source_control block? It’s a top-level attribute but should point to the repo URL & branch for your SCM type. Let me know, we might have to update the documentation for clarity if it achieves what you’re looking to do.

Hi @joatmon08,

Thanks for the reply. I tried to update my main configuration file with the source_control block, but received errors both at top level and nested inside the site config.

Top level placement Error: "source_control": this field cannot be set

Nested in site config: Error: Unsupported block type


I am in the same situation.
My initial goal was to automate the deployment of the Microsoft Azure WordPress template.

I’m stuck with the same message:
Error: “source_control”: this field can not be set

My settings are:
scm_type = “ExternalGit”

 source_control = [
     branch = "master"
     repo_url = ""

Thanks for your help ! :slight_smile:

Facing the same issue. Were you able to find any solution to it?


I encourage you to talk to the community on GitHub.
This topic is about the subject:

For my part, I have not dug the problem, for lack of time, for now I think the only workaround is to go through azurerm_template_deployment pending full support.