hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.64k forks source link

Cannot refresh state when deploying new `azurerm_app_service_source_control` resource. #25772

Open avinode-amagdy opened 6 months ago

avinode-amagdy commented 6 months ago

Is there an existing issue for this?

Community Note

I'm trying to create an app resource to deploy an azure sample app from public github repository, the creation is done successfully with no issues but when I try to run terraform refresh or when I try to redeploy after updating the configurations (i.e. run terraform deploy) the deployment fails.

Terraform Version

1.2.6

AzureRM Provider Version

"~> 3.78" , also tried with the latest version "~> 3.101.0"

Affected Resource(s)/Data Source(s)

resource azurerm_app_service_source_control

Terraform Configuration Files

terraform {
  required_version = ">= 1.2.6"
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~> 3.101.0"
    }
  }
}

provider "azurerm" {
  subscription_id = "<subscription_id>"
  features {}
}

resource "azurerm_service_plan" "app_service_plan" {
  name                = "app-service-plan-test"
  resource_group_name = "resource_group_name"
  location            = "eastus"
  os_type             = "Windows"
  sku_name            = "F1"
  tags                   = var.default_tags
  zone_balancing_enabled = false
}

resource "azurerm_windows_web_app" "topic_viewer" {
  name                = "event-grid-test"
  resource_group_name = "resource_group_name"
  location            = "eastus"
  service_plan_id     = azurerm_service_plan.app_service_plan.id

  site_config {
    always_on                         = false
    ftps_state                        = "AllAllowed"
    websockets_enabled                = true
    worker_count                      = 1
    health_check_eviction_time_in_min = 5
    application_stack {
      current_stack  = "dotnet"
      dotnet_version = "v6.0"
    }
  }
}

resource "azurerm_app_service_source_control" "source_control" {
  app_id   = azurerm_windows_web_app.topic_viewer.id
  branch   = "main"
  repo_url = "https://github.com/Azure-Samples/azure-event-grid-viewer.git"

  # I tried the removing the following attributes, I get the same result.
  use_manual_integration = true
  use_mercurial = false
}

Debug Output/Panic Output

azurerm_app_service_source_control.source_control: Refreshing state... [id=/subscriptions/<subscription_id>/resourceGroups/resource_group_name/providers/Microsoft.Web/sites/event-grid-te
st-support]
╷
│ Error: reading Source Control for App Service (Subscription: "<subscription_id>"
│ Resource Group Name: "resource_group_name"
│ Site Name: "event-grid-test-support"): unexpected status 400 (400 Bad Request) with response: {"Code":"BadRe
quest","Message":"Repository 'GetSiteSourceControl' operation failed with System.Collections.Generic.KeyNotFou
ndException: The given key was not present in the dictionary.\r\n   at System.ThrowHelper.ThrowKeyNotFoundExce
ption()\r\n   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n   at Microsoft.Web.Hosting.Adm
inistration.ExternalSiteRepositoryProvider.<GetSiteSourceControl>d__4.MoveNext() in C:\\__w\\1\\s\\src\\Hostin
g\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\ExternalSiteRepositoryProvider.cs:l
ine 36\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime
.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNo
nSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.<>
c__DisplayClass377_0.<<GetSiteSourceControl>b__0>d.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationSe
rvice\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.cs:line 11368\r\n--- End of stack
 trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.Excepti
onDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotific
ation(Task task)\r\n   at Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at Microsoft.W
eb.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subscriptionName, String webspaceName
, String name).","Target":null,"Details":[{"Message":"Repository 'GetSiteSourceControl' operation failed with 
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.\r\n   at Sys
tem.ThrowHelper.ThrowKeyNotFoundException()\r\n   at System.Collections.Generic.Dictionary`2.get_Item(TKey key
)\r\n   at Microsoft.Web.Hosting.Administration.ExternalSiteRepositoryProvider.<GetSiteSourceControl>d__4.Move
Next() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\
\ExternalSiteRepositoryProvider.cs:line 36\r\n--- End of stack trace from previous location where exception wa
s thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.C
ompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.
Administration.WebCloudController.<>c__DisplayClass377_0.<<GetSiteSourceControl>b__0>d.MoveNext() in C:\\__w\\
1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudControll
er.cs:line 11368\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at Syst
em.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaite
r.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.AsyncHelper.RunSync[TResul
t](Func`1 func)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String s
ubscriptionName, String webspaceName, String name)."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"05
007","MessageTemplate":"Repository '{0}' operation failed with {1}.","Parameters":["GetSiteSourceControl","Sys
tem.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.\r\n   at System
.ThrowHelper.ThrowKeyNotFoundException()\r\n   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r
\n   at Microsoft.Web.Hosting.Administration.ExternalSiteRepositoryProvider.<GetSiteSourceControl>d__4.MoveNex
t() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\Ex
ternalSiteRepositoryProvider.cs:line 36\r\n--- End of stack trace from previous location where exception was t
hrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.Comp
ilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.Adm
inistration.WebCloudController.<>c__DisplayClass377_0.<<GetSiteSourceControl>b__0>d.MoveNext() in C:\\__w\\1\\
s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.
cs:line 11368\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.
Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.H
andleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](
Func`1 func)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subs
criptionName, String webspaceName, String name)"],"Code":"BadRequest","Message":"Repository 'GetSiteSourceCont
rol' operation failed with System.Collections.Generic.KeyNotFoundException: The given key was not present in t
he dictionary.\r\n   at System.ThrowHelper.ThrowKeyNotFoundException()\r\n   at System.Collections.Generic.Dic
tionary`2.get_Item(TKey key)\r\n   at Microsoft.Web.Hosting.Administration.ExternalSiteRepositoryProvider.<Get
SiteSourceControl>d__4.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting
.Administration\\Providers\\ExternalSiteRepositoryProvider.cs:line 36\r\n--- End of stack trace from previous 
location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(
)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 
  at Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass377_0.<<GetSiteSourceControl>b__
0>d.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Co
ntrollers\\WebCloudController.cs:line 11368\r\n--- End of stack trace from previous location where exception w
as thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.
CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting
.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.Ge
tSiteSourceControl(String subscriptionName, String webspaceName, String name)."}}],"Innererror":null}

Expected Behaviour

Terraform command should end successfully, specially when no changes were done after the first deployment.

Actual Behaviour

the application fails with a traceback, the traceback shows windows file paths however the command is running on MacOS environment.

Steps to Reproduce

No response

Important Factoids

No response

References

No response

xiaxyi commented 6 months ago

Thanks @avinode-amagdy for raising this issue, are you able to do the redeploy using azure cli (https://learn.microsoft.com/en-us/cli/azure/webapp/deployment/source?view=azure-cli-latest) after you updated the configuration file?

avinode-amagdy commented 6 months ago

@xiaxyi I tried to re-deploy the app using the command you provided a link to, and it works when after the first deployment but after terraform fails I get the following error in command line (using the command you referred to):

There was a conflict. Conflict with existing ScmType: ExternalGit

I really cannot get my hands on the pattern when it fails, the failure seems very random specially that now it's not failing after immediately after the creation, but I noticed that when terraform fails to read the source-control resource the portal also shows an error on retrieving the github repo info.

I believe that it's something in the backend that is failing not terraform.

pregress commented 2 months ago

Same issue when trying to import a azurerm_app_service_source_control With bitbucket as a repo url, so the stack trace is a little different.

Terraform version: 1.9.5 Azure rm version: 4.0.1

Seems like this is the original issue: https://github.com/hashicorp/terraform-provider-azurerm/issues/3696

azurerm_app_service_source_control.bitbucket: Refreshing state... [id=/subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.Web/sites/REDACTED]
╷
│ Error: reading Source Control for App Service (Subscription: "REDACTED"
│ Resource Group Name: "REDACTED"
│ Site Name: "REDACTED"): unexpected status 400 (400 Bad Request) with response: {"Code":"BadRequest","Message":"Repository 'GetSiteSourceControl' operation failed with System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.\r\n   at System.ThrowHelper.ThrowKeyNotFoundException()\r\n   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n   at Microsoft.Web.Hosting.Administration.BitbucketSiteRepositoryProvider.<GetSiteSourceControl>d__2.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\BitbucketSiteRepositoryProvider.cs:line 29\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass378_0.<<GetSiteSourceControl>b__0>d.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.cs:line 11379\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subscriptionName, String webspaceName, String name).","Target":null,"Details":[{"Message":"Repository 'GetSiteSourceControl' operation failed with System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.\r\n   at System.ThrowHelper.ThrowKeyNotFoundException()\r\n   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n   at Microsoft.Web.Hosting.Administration.BitbucketSiteRepositoryProvider.<GetSiteSourceControl>d__2.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\BitbucketSiteRepositoryProvider.cs:line 29\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass378_0.<<GetSiteSourceControl>b__0>d.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.cs:line 11379\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subscriptionName, String webspaceName, String name)."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"05007","MessageTemplate":"Repository '{0}' operation failed with {1}.","Parameters":["GetSiteSourceControl","System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.\r\n   at System.ThrowHelper.ThrowKeyNotFoundException()\r\n   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n   at Microsoft.Web.Hosting.Administration.BitbucketSiteRepositoryProvider.<GetSiteSourceControl>d__2.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\BitbucketSiteRepositoryProvider.cs:line 29\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass378_0.<<GetSiteSourceControl>b__0>d.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.cs:line 11379\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subscriptionName, String webspaceName, String name)"],"Code":"BadRequest","Message":"Repository 'GetSiteSourceControl' operation failed with System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.\r\n   at System.ThrowHelper.ThrowKeyNotFoundException()\r\n   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n   at Microsoft.Web.Hosting.Administration.BitbucketSiteRepositoryProvider.<GetSiteSourceControl>d__2.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\BitbucketSiteRepositoryProvider.cs:line 29\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass378_0.<<GetSiteSourceControl>b__0>d.MoveNext() in C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.cs:line 11379\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subscriptionName, String webspaceName, String name)."}}],"Innererror":null}
│
│ reading Source Control for App Service (Subscription: "REDACTED"
│ Resource Group Name: "REDACTED"
│ Site Name: "REDACTED"): unexpected status 400 (400 Bad Request) with response: {"Code":"BadRequest","Message":"Repository
│ 'GetSiteSourceControl' operation failed with System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.\r\n   at
│ System.ThrowHelper.ThrowKeyNotFoundException()\r\n   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n   at
│ Microsoft.Web.Hosting.Administration.BitbucketSiteRepositoryProvider.<GetSiteSourceControl>d__2.MoveNext() in
│ C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\BitbucketSiteRepositoryProvider.cs:line 29\r\n---
│ End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at
│ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at
│ Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass378_0.<<GetSiteSourceControl>b__0>d.MoveNext() in
│ C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.cs:line 11379\r\n--- End of
│ stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at
│ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at
│ Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at
│ Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subscriptionName, String webspaceName, String
│ name).","Target":null,"Details":[{"Message":"Repository 'GetSiteSourceControl' operation failed with System.Collections.Generic.KeyNotFoundException: The
│ given key was not present in the dictionary.\r\n   at System.ThrowHelper.ThrowKeyNotFoundException()\r\n   at
│ System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n   at
│ Microsoft.Web.Hosting.Administration.BitbucketSiteRepositoryProvider.<GetSiteSourceControl>d__2.MoveNext() in
│ C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\BitbucketSiteRepositoryProvider.cs:line 29\r\n---
│ End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at
│ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at
│ Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass378_0.<<GetSiteSourceControl>b__0>d.MoveNext() in
│ C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.cs:line 11379\r\n--- End of
│ stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at
│ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at
│ Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at
│ Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subscriptionName, String webspaceName, String
│ name)."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"05007","MessageTemplate":"Repository '{0}' operation failed with
│ {1}.","Parameters":["GetSiteSourceControl","System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.\r\n   at
│ System.ThrowHelper.ThrowKeyNotFoundException()\r\n   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n   at
│ Microsoft.Web.Hosting.Administration.BitbucketSiteRepositoryProvider.<GetSiteSourceControl>d__2.MoveNext() in
│ C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\BitbucketSiteRepositoryProvider.cs:line 29\r\n---
│ End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at
│ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at
│ Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass378_0.<<GetSiteSourceControl>b__0>d.MoveNext() in
│ C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.cs:line 11379\r\n--- End of
│ stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at
│ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at
│ Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at
│ Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subscriptionName, String webspaceName, String
│ name)"],"Code":"BadRequest","Message":"Repository 'GetSiteSourceControl' operation failed with System.Collections.Generic.KeyNotFoundException: The given
│ key was not present in the dictionary.\r\n   at System.ThrowHelper.ThrowKeyNotFoundException()\r\n   at
│ System.Collections.Generic.Dictionary`2.get_Item(TKey key)\r\n   at
│ Microsoft.Web.Hosting.Administration.BitbucketSiteRepositoryProvider.<GetSiteSourceControl>d__2.MoveNext() in
│ C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Providers\\BitbucketSiteRepositoryProvider.cs:line 29\r\n---
│ End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at
│ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at
│ Microsoft.Web.Hosting.Administration.WebCloudController.<>c__DisplayClass378_0.<<GetSiteSourceControl>b__0>d.MoveNext() in
│ C:\\__w\\1\\s\\src\\Hosting\\AdministrationService\\Microsoft.Web.Hosting.Administration\\Controllers\\WebCloudController.cs:line 11379\r\n--- End of
│ stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at
│ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at
│ Microsoft.Web.Hosting.AsyncHelper.RunSync[TResult](Func`1 func)\r\n   at
│ Microsoft.Web.Hosting.Administration.WebCloudController.GetSiteSourceControl(String subscriptionName, String webspaceName, String
│ name)."}}],"Innererror":null}
╵