-
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
scm_type = "LocalGit" causes setting to be reapplied in azurerm_function_app #8676
Comments
Also seeing this same Error using azurerm v2.25.0 and terraform v0.13.4 however the resource was created with scm_type="LocalGit" originally, and worked, but now is failing when trying to apply other changes to the app_settings (adding additional env vars). This has left us dead in the water for updating our environments without doing so manually through the Azure Portal. To me it seems the RepoUrl is missing the corresponding |
Just updated to azurem v2.33 and terraform v0.13.5 and the problem has disappeared for me. |
Thanks @TheRealWaldo - possibly this fix in azurerm v2.31 #8682 ? |
We are facing this same issue for azurerm_app_service when using scm_type="LocalGit" On first deployment everything works fine, also when the tf is rerun there is no issue until a change anywhere in the app_service config in introduced then we are presented with an error: Error: failed to update App Service Source Control for "my-app" (Resource Group "my-rg"): web.AppsClient#CreateOrUpdateSourceControl: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="Operation not supported: RepoUrl https://my-app.scm.chinacloudsites.cn is not supported." Details=[{"Message":"Operation not supported: RepoUrl https://my-app.scm.chinacloudsites.cn is not supported."},{"Code":"BadRequest"},{"ErrorEntity":{"Code":"BadRequest","ExtendedCode":"51024","Message":"Operation not supported: RepoUrl https://my-app.scm.chinacloudsites.cn is not supported.","MessageTemplate":"Operation not supported: {0}","Parameters":["RepoUrl https://my-app.scm.chinacloudsites.cn is not supported."]}}] This is in Azure China with Terraform 0.13.5 and AzureRM 2.33.0 Also to note if the terraform is simply rerun after the above error it runs cleanly (still not good in automation) Also just to note we cannot test with AzRM 2.34.0 due to another unrelated bug |
Also can confirm with @TheMacStack on editing other unrelated properties, the issue does return, still using v2.33 and v0.13.5 |
This is not fixed in v2.36. |
This has been released in version 2.46.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.46.0"
}
# ... other configuration ... |
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 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_function_app
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Running
terraform apply
for a second time shouldn't need to re-add thescm_type
setting.Actual Behavior
Running
terraform apply
a second time tries to re-set thescm_type
setting.Steps to Reproduce
terraform apply
Important Factoids
None
References
https://github.com/terraform-providers/terraform-provider-azurerm/pull/7945/files#diff-22a801f99219a354ae919cbe0cf2f4a2R427
Looks like
flattenFunctionAppSiteConfig
is missing settingresult["scm_type"]
. This is read inexpandFunctionAppSiteConfig
.https://github.com/terraform-providers/terraform-provider-azurerm/blob/90e16c22f96e320f1659cc6e0374535d773652ad/azurerm/internal/services/web/function_app.go#L384-L436
The corresponding function for non-function app services do set this: (
flattenAppServiceSiteConfig
)https://github.com/terraform-providers/terraform-provider-azurerm/blob/90e16c22f96e320f1659cc6e0374535d773652ad/azurerm/internal/services/web/app_service.go#L1704
The text was updated successfully, but these errors were encountered: