Skip to content

Commit

Permalink
address pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte committed Sep 19, 2020
1 parent 6ef3b79 commit ece80e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions azurerm/internal/services/web/resource_arm_app_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ func resourceArmAppServiceUpdate(d *schema.ResourceData, meta interface{}) error
// If `source_control` is defined, we need to set site_config.0.scm_type to "None" or we cannot update it
_, hasSourceControl := d.GetOk("source_control.0.repo_url")

scmType := web.ScmType("None")
scmType := web.ScmTypeNone

if d.HasChange("site_config") || hasSourceControl {
// update the main configuration
Expand All @@ -392,7 +392,7 @@ func resourceArmAppServiceUpdate(d *schema.ResourceData, meta interface{}) error
scmType = siteConfig.ScmType
// ScmType being set blocks the update of source_control in _most_ cases, ADO is an exception
if hasSourceControl && scmType != web.ScmTypeVSTSRM {
siteConfigResource.SiteConfig.ScmType = "None"
siteConfigResource.SiteConfig.ScmType = web.ScmTypeNone
}

if _, err := client.CreateOrUpdateConfiguration(ctx, id.ResourceGroup, id.Name, siteConfigResource); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions azurerm/internal/services/web/resource_arm_function_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ func resourceArmFunctionAppUpdate(d *schema.ResourceData, meta interface{}) erro
// repo_url is required by the API
_, hasSourceControl := d.GetOk("source_control.0.repo_url")

scmType := web.ScmType("None")
scmType := web.ScmTypeNone

if d.HasChange("site_config") || hasSourceControl {
siteConfig, err := expandFunctionAppSiteConfig(d)
Expand All @@ -472,7 +472,7 @@ func resourceArmFunctionAppUpdate(d *schema.ResourceData, meta interface{}) erro
scmType = siteConfig.ScmType
// ScmType being set blocks the update of source_control in _most_ cases, ADO is an exception
if hasSourceControl && scmType != web.ScmTypeVSTSRM {
siteConfigResource.SiteConfig.ScmType = "None"
siteConfigResource.SiteConfig.ScmType = web.ScmTypeNone
}

if _, err := client.CreateOrUpdateConfiguration(ctx, id.ResourceGroup, id.Name, siteConfigResource); err != nil {
Expand Down

0 comments on commit ece80e9

Please sign in to comment.