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

unable to deploy windows_function_app_slot to App Service Environment v3 #17689

Open gorillaking opened 2 years ago

gorillaking commented 2 years ago

Is there an existing issue for this?

Community Note

Terraform Version

1.1.7

AzureRM Provider Version

3.14.0

Affected Resource(s)/Data Source(s)

azurerm_windows_function_app_slot

Terraform Configuration Files

resource "azurerm_resource_group" "iac_poc_rg" {
    name = "iac_poc_rg"
    location = "eastus"
}

# This is an I1v2 App service plan hosted in an App Service Environment v3
data "azurerm_service_plan" "asp" {
  name = "test-asp"
  resource_group_name = "test-asp-rg"
}

resource "azurerm_storage_account" "poc_sa" {
  name = "pocsa"
  resource_group_name      = azurerm_resource_group.iac_poc_rg.name
  location                 = azurerm_resource_group.iac_poc_rg.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_windows_function_app" "poc_fa" {
  name = "poc-fa"
  resource_group_name      = azurerm_resource_group.iac_poc_rg.name
  location                 = azurerm_resource_group.iac_poc_rg.location
  storage_account_name = azurerm_storage_account.poc_sa.name
  storage_account_access_key = azurerm_storage_account.poc_sa.primary_access_key
  service_plan_id = data.azurerm_service_plan.asp.id

  site_config {}
}

resource "azurerm_windows_function_app_slot" "poc_fas" {
  name                 = "poc-fa-slot"
  function_app_id      = azurerm_windows_function_app.poc_fa.id
  storage_account_name = azurerm_storage_account.poc_sa.name
  storage_account_access_key = azurerm_storage_account.poc_sa.primary_access_key

  site_config {}
}

Debug Output/Panic Output

here are the part of the output that has the errors

{"id":"/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/appsettings","name":"appsettings","type":"Microsoft.Web/sites/config","location":"East US","tags":{},"properties":{"FUNCTIONS_EXTENSION_VERSION":"~4","AzureWebJobsStorage":"DefaultEndpointsProtocol=https;AccountName=aliacpocsa;AccountKey=Em56k/wSpTe+9zhNyXlwfsMj+DS39CbhtRr7sqIiPn9c9UZIGZLzdVpGViF22VZsFU/db1mq3Ttu+AStRwUtAA==;EndpointSuffix=core.windows.net","AzureWebJobsDashboard":"DefaultEndpointsProtocol=https;AccountName=aliacpocsa;AccountKey=Em56k/wSpTe+9zhNyXlwfsMj+DS39CbhtRr7sqIiPn9c9UZIGZLzdVpGViF22VZsFU/db1mq3Ttu+AStRwUtAA==;EndpointSuffix=core.windows.net","WEBSITE_CONTENTSHARE":"al-iac-fa-slot-6b5c","WEBSITE_CONTENTAZUREFILECONNECTIONSTRING":"DefaultEndpointsProtocol=https;AccountName=aliacpocsa;AccountKey=Em56k/wSpTe+9zhNyXlwfsMj+DS39CbhtRr7sqIiPn9c9UZIGZLzdVpGViF22VZsFU/db1mq3Ttu+AStRwUtAA==;EndpointSuffix=core.windows.net","WEBSITE_VNET_ROUTE_ALL":"1"}}: timestamp=2022-07-14T14:35:05.595-0400
2022-07-14T14:35:05.595-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Request: 
POST /subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/connectionstrings/list?api-version=2021-02-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.18.1 (amd64-windows) go-autorest/v14.2.1 Azure-SDK-For-Go/v64.1.0 web/2021-02-01 HashiCorp Terraform/1.1.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 0
X-Ms-Authorization-Auxiliary: 
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
Accept-Encoding: gzip: timestamp=2022-07-14T14:35:05.595-0400
2022-07-14T14:35:08.563-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Response for https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/connectionstrings/list?api-version=2021-02-01: 
HTTP/2.0 200 OK
Cache-Control: no-cache
Content-Type: application/json
Date: Thu, 14 Jul 2022 18:35:08 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Accept-Encoding
X-Aspnet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: 11998
X-Ms-Request-Id: d6a2d47b-2085-4ab7-982e-f2782a771ba2
X-Ms-Routing-Request-Id: SOUTHCENTRALUS:20220714T183508Z:e92131dd-755c-4060-8177-38fda0eb9d05
X-Powered-By: ASP.NET

{"id":"/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/connectionstrings","name":"connectionstrings","type":"Microsoft.Web/sites/config","location":"East US","tags":{},"properties":{}}: timestamp=2022-07-14T14:35:08.563-0400
2022-07-14T14:35:08.564-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Request: 
POST /subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/publishingcredentials/list?api-version=2021-02-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.18.1 (amd64-windows) go-autorest/v14.2.1 Azure-SDK-For-Go/v64.1.0 web/2021-02-01 HashiCorp Terraform/1.1.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 0
X-Ms-Authorization-Auxiliary: 
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
Accept-Encoding: gzip: timestamp=2022-07-14T14:35:08.563-0400
2022-07-14T14:35:10.140-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Response for https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/publishingcredentials/list?api-version=2021-02-01: 
HTTP/2.0 200 OK
Cache-Control: no-cache
Content-Type: application/json
Date: Thu, 14 Jul 2022 18:35:09 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Accept-Encoding
X-Aspnet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: 11997
X-Ms-Request-Id: 663276e0-4915-4627-b135-0fcec5dc7085
X-Ms-Routing-Request-Id: SOUTHCENTRALUS:20220714T183510Z:22835a5d-2272-4bb2-8c56-a95352b8a65f
X-Powered-By: ASP.NET

{"id":"/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/publishingcredentials/$al-iac-fa__al-iac-fa-slot","name":"al-iac-fa","type":"Microsoft.Web/sites/publishingcredentials","location":"East US","tags":{},"properties":{"name":null,"publishingUserName":"$al-iac-fa__al-iac-fa-slot","publishingPassword":"zWbusY9WoBFnzHhaTDRSshN5uRmRf1Yao3MkpFgCDjFzhzh0D3SjdJRTrSbi","publishingPasswordHash":null,"publishingPasswordHashSalt":null,"metadata":null,"isDeleted":false,"scmUri":"https://$al-iac-fa__al-iac-fa-slot:zWbusY9WoBFnzHhaTDRSshN5uRmRf1Yao3MkpFgCDjFzhzh0D3SjdJRTrSbi@al-iac-fa-al-iac-fa-slot.scm.al-dev-backend-eastus.p.azurewebsites.net"}}: timestamp=2022-07-14T14:35:10.140-0400
2022-07-14T14:35:10.140-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Request: 
POST /subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/authsettings/list?api-version=2021-02-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.18.1 (amd64-windows) go-autorest/v14.2.1 Azure-SDK-For-Go/v64.1.0 web/2021-02-01 HashiCorp Terraform/1.1.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 0
X-Ms-Authorization-Auxiliary: 
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
Accept-Encoding: gzip: timestamp=2022-07-14T14:35:10.140-0400
2022-07-14T14:35:10.568-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Response for https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/authsettings/list?api-version=2021-02-01: 
HTTP/2.0 200 OK
Cache-Control: no-cache
Content-Type: application/json
Date: Thu, 14 Jul 2022 18:35:10 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Accept-Encoding
X-Aspnet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: 11996
X-Ms-Request-Id: f9dff991-e079-4ee0-864c-e624793d2813
X-Ms-Routing-Request-Id: SOUTHCENTRALUS:20220714T183510Z:d81577b4-d7a6-49e7-b6eb-8c1108efee70
X-Powered-By: ASP.NET

{"id":"/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/authsettings","name":"authsettings","type":"Microsoft.Web/sites/config","location":"East US","tags":{},"properties":{"enabled":false,"unauthenticatedClientAction":null,"tokenStoreEnabled":null,"allowedExternalRedirectUrls":null,"defaultProvider":null,"clientId":null,"clientSecret":null,"clientSecretSettingName":null,"clientSecretCertificateThumbprint":null,"issuer":null,"allowedAudiences":null,"additionalLoginParams":null,"isAadAutoProvisioned":false,"aadClaimsAuthorization":null,"googleClientId":null,"googleClientSecret":null,"googleClientSecretSettingName":null,"googleOAuthScopes":null,"facebookAppId":null,"facebookAppSecret":null,"facebookAppSecretSettingName":null,"facebookOAuthScopes":null,"gitHubClientId":null,"gitHubClientSecret":null,"gitHubClientSecretSettingName":null,"gitHubOAuthScopes":null,"twitterConsumerKey":null,"twitterConsumerSecret":null,"twitterConsumerSecretSettingName":null,"microsoftAccountClientId":null,"microsoftAccountClientSecret":null,"microsoftAccountClientSecretSettingName":null,"microsoftAccountOAuthScopes":null,"configVersion":"v1"}}: timestamp=2022-07-14T14:35:10.568-0400
2022-07-14T14:35:10.569-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Request: 
POST /subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/backup/list?api-version=2021-02-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.18.1 (amd64-windows) go-autorest/v14.2.1 Azure-SDK-For-Go/v64.1.0 web/2021-02-01 HashiCorp Terraform/1.1.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 0
X-Ms-Authorization-Auxiliary: 
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
Accept-Encoding: gzip: timestamp=2022-07-14T14:35:10.569-0400
2022-07-14T14:35:10.930-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Response for https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/backup/list?api-version=2021-02-01: 
HTTP/2.0 404 Not Found
Content-Length: 543
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Thu, 14 Jul 2022 18:35:10 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Aspnet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: 11995
X-Ms-Request-Id: 12d6510f-a8bc-47cb-9631-306d6a3a66a2
X-Ms-Routing-Request-Id: SOUTHCENTRALUS:20220714T183510Z:12d6510f-a8bc-47cb-9631-306d6a3a66a2
X-Powered-By: ASP.NET

{"Code":"NotFound","Message":"Backup configuration not found for site 'al-iac-fa' with slot 'al-iac-fa-slot'","Target":null,"Details":[{"Message":"Backup configuration not found for site 'al-iac-fa' with slot 'al-iac-fa-slot'"},{"Code":"NotFound"},{"ErrorEntity":{"ExtendedCode":"04211","MessageTemplate":"Backup configuration not found for site '{0}' with slot '{1}'","Parameters":["al-iac-fa","al-iac-fa-slot"],"Code":"NotFound","Message":"Backup configuration not found for site 'al-iac-fa' with slot 'al-iac-fa-slot'"}}],"Innererror":null}: timestamp=2022-07-14T14:35:10.926-0400
2022-07-14T14:35:10.930-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Request: 
GET /subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/logs?api-version=2021-02-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.18.1 (amd64-windows) go-autorest/v14.2.1 Azure-SDK-For-Go/v64.1.0 web/2021-02-01 HashiCorp Terraform/1.1.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
X-Ms-Authorization-Auxiliary: 
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
Accept-Encoding: gzip: timestamp=2022-07-14T14:35:10.926-0400
2022-07-14T14:35:57.920-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Response for https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/logs?api-version=2021-02-01: 
HTTP/2.0 503 Service Unavailable
Content-Length: 614
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Thu, 14 Jul 2022 18:35:57 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Aspnet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
X-Ms-Failure-Cause: service
X-Ms-Ratelimit-Remaining-Subscription-Reads: 11994
X-Ms-Request-Id: 8f7fb7d1-5fc3-4145-8a3b-df9bf4d49ada
X-Ms-Routing-Request-Id: SOUTHCENTRALUS:20220714T183557Z:8f7fb7d1-5fc3-4145-8a3b-df9bf4d49ada
X-PowereETd-By: ASP.N

{"Code":"ServiceUnavailable","Message":"The operation timed out and could not be completed. Please retry the action or try again later.","Target":null,"Details":[{"Message":"The operation timed out and could not be completed. Please retry the action or try again later."},{"Code":"ServiceUnavailable"},{"ErrorEntity":{"ExtendedCode":"51007","MessageTemplate":"The operation timed out and could not be completed. Please retry the action or try again later.","Code":"ServiceUnavailable","Message":"The operation timed out and could not be completed. Please retry the action or try again later."}}],"Innererror":null}: timestamp=2022-07-14T14:35:57.920-0400
2022-07-14T14:36:27.922-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Request: 
GET /subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/logs?api-version=2021-02-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.18.1 (amd64-windows) go-autorest/v14.2.1 Azure-SDK-For-Go/v64.1.0 web/2021-02-01 HashiCorp Terraform/1.1.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
X-Ms-Authorization-Auxiliary: 
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
Accept-Encoding: gzip: timestamp=2022-07-14T14:36:27.921-0400
2022-07-14T14:37:13.057-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Response for https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/logs?api-version=2021-02-01: 
HTTP/2.0 503 Service Unavailable
Content-Length: 614
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Thu, 14 Jul 2022 18:37:13 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Aspnet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
X-Ms-Failure-Cause: service
X-Ms-Ratelimit-Remaining-Subscription-Reads: 11993
X-Ms-Request-Id: cef2c3a3-4a5b-4f95-af8b-71b415df20b9
X-Ms-Routing-Request-Id: SOUTHCENTRALUS:20220714T183713Z:cef2c3a3-4a5b-4f95-af8b-71b415df20b9
X-Powered-By: ASP.NET

{"Code":"ServiceUnavailable","Message":"The operation timed out and could not be completed. Please retry the action or try again later.","Target":null,"Details":[{"Message":"The operation timed out and could not be completed. Please retry the action or try again later."},{"Code":"ServiceUnavailable"},{"ErrorEntity":{"ExtendedCode":"51007","MessageTemplate":"The operation timed out and could not be completed. Please retry the action or try again later.","Code":"ServiceUnavailable","Message":"The operation timed out and could not be completed. Please retry the action or try again later."}}],"Innererror":null}: timestamp=2022-07-14T14:37:13.057-0400
2022-07-14T14:38:13.064-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Request: 
GET /subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/logs?api-version=2021-02-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.18.1 (amd64-windows) go-autorest/v14.2.1 Azure-SDK-For-Go/v64.1.0 web/2021-02-01 HashiCorp Terraform/1.1.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
X-Ms-Authorization-Auxiliary: 
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
Accept-Encoding: gzip: timestamp=2022-07-14T14:38:13.063-0400
2022-07-14T14:38:58.318-0400 [DEBUG] provider.terraform-provider-azurerm_v3.12.0_x5.exe: AzureRM Response for https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/iac_poc_rg/providers/Microsoft.Web/sites/al-iac-fa/slots/al-iac-fa-slot/config/logs?api-version=2021-02-01: 
HTTP/2.0 503 Service Unavailable
Content-Length: 614
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Thu, 14 Jul 2022 18:38:57 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Aspnet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 005be71e-9693-ea54-3847-0893d1ff4a92
X-Ms-Failure-Cause: service
X-Ms-Ratelimit-Remaining-Subscription-Reads: 11992
X-Ms-Request-Id: 7c555a02-dc68-4585-8441-5c98bfa5723d
X-Ms-Routing-Request-Id: SOUTHCENTRALUS:20220714T183858Z:7c555a02-dc68-4585-8441-5c98bfa5723d
X-Powered-By: ASP.NET

{"Code":"ServiceUnavailable","Message":"The operation timed out and could not be completed. Please retry the action or try again later.","Target":null,"Details":[{"Message":"The operation timed out and could not be completed. Please retry the action or try again later."},{"Code":"ServiceUnavailable"},{"ErrorEntity":{"ExtendedCode":"51007","MessageTemplate":"The operation timed out and could not be completed. Please retry the action or try again later.","Code":"ServiceUnavailable","Message":"The operation timed out and could not be completed. Please retry the action or try again later."}}],"Innererror":null}: timestamp=2022-07-14T14:38:58.312-0400
2022-07-14T14:40:01.348-0400 [ERROR] vertex "azurerm_windows_function_app_slot.poc_fas" error: reading logs configuration for Windows Function App Slot: (Slot Name "al-iac-fa-slot" / Site Name "al-iac-fa" / Resource Group "iac_poc_rg"): web.AppsClient#GetDiagnosticLogsConfigurationSlot: Failure sending request: StatusCode=503 -- Original Error: context deadline exceeded
2022-07-14T14:40:01.348-0400 [ERROR] vertex "azurerm_windows_function_app_slot.poc_fas" error: reading logs configuration for Windows Function App Slot: (Slot Name "al-iac-fa-slot" / Site Name "al-iac-fa" / Resource Group "iac_poc_rg"): web.AppsClient#GetDiagnosticLogsConfigurationSlot: Failure sending request: StatusCode=503 -- Original Error: context deadline exceeded
2022-07-14T14:40:01.348-0400 [ERROR] vertex "azurerm_windows_function_app_slot.poc_fas (expand)" error: reading logs configuration for Windows Function App Slot: (Slot Name "al-iac-fa-slot" / Site Name "al-iac-fa" / Resource Group "iac_poc_rg"): web.AppsClient#GetDiagnosticLogsConfigurationSlot: Failure sending request: StatusCode=503 -- Original Error: context deadline exceeded
2022-07-14T14:40:01.361-0400 [INFO]  backend/local: plan operation completed
2022-07-14T14:40:01.367-0400 [DEBUG] Azure Backend Request: 
HEAD /tfstate/test.tfstateenv%3Adev HTTP/1.1
Host: alterraformnonprod.blob.core.windows.net
User-Agent: Terraform/1.1.7
X-Ms-Date: Thu, 14 Jul 2022 18:40:01 GMT
X-Ms-Lease-Id: 9629ecb4-1c98-0c25-4e4e-2a60128fafcc
X-Ms-Version: 2018-11-09
2022-07-14T14:40:01.721-0400 [DEBUG] Azure Backend Response for https://alterraformnonprod.blob.core.windows.net/tfstate/test.tfstateenv%3Adev: 
HTTP/1.1 200 OK
Content-Length: 20350
Accept-Ranges: bytes
Content-Md5: Z34HjcC/Yibeel/ixBmWHQ==
Content-Type: application/json
Date: Thu, 14 Jul 2022 18:40:01 GMT
Etag: "0x8DA65C782C6E25E"
Last-Modified: Thu, 14 Jul 2022 18:34:39 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
X-Ms-Access-Tier: Hot
X-Ms-Access-Tier-Inferred: true
X-Ms-Blob-Type: BlockBlob
X-Ms-Creation-Time: Thu, 14 Jul 2022 18:28:57 GMT
X-Ms-Lease-Duration: infinite
X-Ms-Lease-State: leased
X-Ms-Lease-Status: locked
X-Ms-Meta-Terraformlockid: eyJJRCI6Ijk2MjllY2I0LTFjOTgtMGMyNS00ZTRlLTJhNjAxMjhmYWZjYyIsIk9wZXJhdGlvbiI6Ik9wZXJhdGlvblR5cGVQbGFuIiwiSW5mbyI6IiIsIldobyI6Ik5BT1xcSFpRQzdWQFVTQUNDV05XWDMzUUZXRyIsIlZlcnNpb24iOiIxLjEuNyIsIkNyZWF0ZWQiOiIyMDIyLTA3LTE0VDE4OjM0OjM5LjE5NzQxMjZaIiwiUGF0aCI6InRmc3RhdGUvdGVzdC50ZnN0YXRlZW52OmRldiJ9
X-Ms-Request-Id: 4c4e6a47-701e-0082-6fb1-97e949000000
X-Ms-Server-Encrypted: true
X-Ms-Version: 2018-11-09
2022-07-14T14:40:01.721-0400 [DEBUG] Azure Backend Request: 
HEAD /tfstate/test.tfstateenv%3Adev HTTP/1.1
Host: alterraformnonprod.blob.core.windows.net
User-Agent: Terraform/1.1.7
X-Ms-Date: Thu, 14 Jul 2022 18:40:01 GMT
X-Ms-Lease-Id: 9629ecb4-1c98-0c25-4e4e-2a60128fafcc
X-Ms-Version: 2018-11-09
2022-07-14T14:40:01.775-0400 [DEBUG] Azure Backend Response for https://alterraformnonprod.blob.core.windows.net/tfstate/test.tfstateenv%3Adev: 
HTTP/1.1 200 OK
Content-Length: 20350
Accept-Ranges: bytes
Content-Md5: Z34HjcC/Yibeel/ixBmWHQ==
Content-Type: application/json
Date: Thu, 14 Jul 2022 18:40:01 GMT
Etag: "0x8DA65C782C6E25E"
Last-Modified: Thu, 14 Jul 2022 18:34:39 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
X-Ms-Access-Tier: Hot
X-Ms-Access-Tier-Inferred: true
X-Ms-Blob-Type: BlockBlob
X-Ms-Creation-Time: Thu, 14 Jul 2022 18:28:57 GMT
X-Ms-Lease-Duration: infinite
X-Ms-Lease-State: leased
X-Ms-Lease-Status: locked
X-Ms-Meta-Terraformlockid: eyJJRCI6Ijk2MjllY2I0LTFjOTgtMGMyNS00ZTRlLTJhNjAxMjhmYWZjYyIsIk9wZXJhdGlvbiI6Ik9wZXJhdGlvblR5cGVQbGFuIiwiSW5mbyI6IiIsIldobyI6Ik5BT1xcSFpRQzdWQFVTQUNDV05XWDMzUUZXRyIsIlZlcnNpb24iOiIxLjEuNyIsIkNyZWF0ZWQiOiIyMDIyLTA3LTE0VDE4OjM0OjM5LjE5NzQxMjZaIiwiUGF0aCI6InRmc3RhdGUvdGVzdC50ZnN0YXRlZW52OmRldiJ9
X-Ms-Request-Id: 4c4e6a83-701e-0082-23b1-97e949000000
X-Ms-Server-Encrypted: true
X-Ms-Version: 2018-11-09
2022-07-14T14:40:01.775-0400 [DEBUG] Azure Backend Request: 
PUT /tfstate/test.tfstateenv%3Adev?comp=metadata HTTP/1.1
Host: alterraformnonprod.blob.core.windows.net
User-Agent: Terraform/1.1.7
Content-Length: 0
X-Ms-Date: Thu, 14 Jul 2022 18:40:01 GMT
X-Ms-Lease-Id: 9629ecb4-1c98-0c25-4e4e-2a60128fafcc
X-Ms-Version: 2018-11-09
Accept-Encoding: gzip
2022-07-14T14:40:01.851-0400 [DEBUG] Azure Backend Response for https://alterraformnonprod.blob.core.windows.net/tfstate/test.tfstateenv%3Adev?comp=metadata: 
HTTP/1.1 200 OK
Content-Length: 0
Date: Thu, 14 Jul 2022 18:40:01 GMT
Etag: "0x8DA65C842F629E2"
Last-Modified: Thu, 14 Jul 2022 18:40:01 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
X-Ms-Request-Id: 4c4e6ab9-701e-0082-59b1-97e949000000
X-Ms-Request-Server-Encrypted: true
X-Ms-Version: 2018-11-09
2022-07-14T14:40:01.851-0400 [DEBUG] Azure Backend Request: 
PUT /tfstate/test.tfstateenv%3Adev?comp=lease HTTP/1.1
Host: alterraformnonprod.blob.core.windows.net
User-Agent: Terraform/1.1.7
Content-Length: 0
X-Ms-Date: Thu, 14 Jul 2022 18:40:01 GMT
X-Ms-Lease-Action: release
X-Ms-Lease-Id: 9629ecb4-1c98-0c25-4e4e-2a60128fafcc
X-Ms-Version: 2018-11-09
Accept-Encoding: gzip
2022-07-14T14:40:01.916-0400 [DEBUG] Azure Backend Response for https://alterraformnonprod.blob.core.windows.net/tfstate/test.tfstateenv%3Adev?comp=lease: 
HTTP/1.1 200 OK
Content-Length: 0
Date: Thu, 14 Jul 2022 18:40:01 GMT
Etag: "0x8DA65C842F629E2"
Last-Modified: Thu, 14 Jul 2022 18:40:01 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
X-Ms-Request-Id: 4c4e6b07-701e-0082-22b1-97e949000000
X-Ms-Version: 2018-11-09
2022-07-14T14:40:01.916-0400 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-07-14T14:40:01.946-0400 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/azurerm/3.12.0/windows_amd64/terraform-provider-azurerm_v3.12.0_x5.exe pid=1908
2022-07-14T14:40:01.947-0400 [DEBUG] provider: plugin exited

Expected Behaviour

I am expect the above script to run without any issue.

Actual Behaviour

During apply, Terraform successfully create all resources. But when it get to the slot creation, it will stuck in "still creating..." for 10 minutes and then timed out and failed apply. The slot did get created on azure correctly, But the tfstate did not reflect that.

I then proceed to import the slot into the tfstate, It got stuck on refreshing state, and timed out after 10 minutes.

I have tried to deploy the slot to different App Service Plans, the only one that is failing is when I deploy to an I1v2 ASP that is in an ASEv3.

I did found a workaround by using the deprecated azurerm_function_app_slot resource, and I have not experienced the aforementioned issues.

Steps to Reproduce

  1. Create an App Service Environment v3.
  2. Create an App Service Plan I1v2.
  3. Apply the above terraform config by pointing to your App Service Plan

Important Factoids

No response

References

No response

kmadof commented 2 years ago

I have the same issue with azurerm_linux_function_app and azurerm_linux_function_app_slot and Premium V3 plan.

gorillaking commented 2 years ago

Any updates on this?

TomPercy commented 1 year ago

I also have this issue, is there a reason this isn't labelled a bug? If we're having to switch to a deprecated version to get this working then it's definitely a bug 😭

veeraragavan52jtb commented 1 year ago

I do have the same issue:

When I remove these three settings from TF, the deployment and refresh (in the next pipeline run) is happening without any issues.

"WEBSITE_CONTENTOVERVNET" = XXXX

"WEBSITE_CONTENTSHARE" =XXXX

"WEBSITE_CONTENTAZUREFILECONNECTIONSTRING" =XXXX

Error: reading logs configuration for Windows Function App: (Site Name "abifun-appsdmt01euntst" / Resource Group "Ability-XX-XX-XXXX-01"): web.AppsClient#GetDiagnosticLogsConfiguration: Failure sending request: StatusCode=503 -- Original Error: context deadline exceeded │ │ with azurerm_windows_function_app.win_funapp[0], │ on function_app.tf line 12, in resource "azurerm_windows_function_app" "win_funapp": │ 12: resource "azurerm_windows_function_app" "win_funapp" { │ │ reading logs configuration for Windows Function App: (Site Name │ "abifun-appsdmt01euntst" / Resource Group "Ability-XX-XX-XXXX-01"): │ web.AppsClient#GetDiagnosticLogsConfiguration: Failure sending request: │ StatusCode=503 -- Original Error: context deadline exceeded

veeraragavan52jtb commented 1 year ago

Another thread with similar issue https://github.com/hashicorp/terraform-provider-azurerm/issues/20953

xiaxyi commented 1 year ago

@gorillaking are you able to create the function app / slot in ASE now?