Skip to content
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

azapi_resource Missing Resource State After Create forMicrosoft.Web/sites/extensions@2022-03-01 #25776

Closed
1 task done
uday31in opened this issue Apr 26, 2024 · 1 comment
Closed
1 task done

Comments

@uday31in
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.13.0

AzureRM Provider Version

3.100.0

Affected Resource(s)/Data Source(s)

azurerm_linux_function_app

Terraform Configuration Files

resource "azapi_resource" "shortclip_function_code_deploy" {
  schema_validation_enabled = false
  type                      = "Microsoft.Web/sites/extensions@2022-03-01"
  name                      = "ZipDeploy"
  parent_id                 = azurerm_linux_function_app.shortclip_function.id
  location                  = var.location
  body = jsonencode({
    properties = {
      "packageUri" : "https://github.com/Azure/ai-hub/raw/main/infrastructure/terraform/modules/functions/rag.zip"
      "appOffline" : true
    }
  })
}

Debug Output/Panic Output

module.functions.azapi_resource.shortclip_function_code_deploy: Still creating... [10s elapsed]
2024-04-26T19:51:00.733+0100 [TRACE] dag/walk: vertex "module.functions (close)" is waiting for "module.functions.azapi_resource.shortclip_function_code_deploy"
2024-04-26T19:51:04.075+0100 [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/azure/azapi\"] (close)" is waiting for "module.functions.azapi_resource.shortclip_function_code_deploy"
2024-04-26T19:51:05.047+0100 [TRACE] dag/walk: vertex "root" is waiting for "provider[\"registry.terraform.io/azure/azapi\"] (close)"
2024-04-26T19:51:05.734+0100 [TRACE] dag/walk: vertex "module.functions (close)" is waiting for "module.functions.azapi_resource.shortclip_function_code_deploy"
2024-04-26T19:51:09.076+0100 [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/azure/azapi\"] (close)" is waiting for "module.functions.azapi_resource.shortclip_function_code_deploy"
2024-04-26T19:51:09.887+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:09.886980 Retry: =====> Try=1
2024-04-26T19:51:09.887+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:09.887131 Request: ==> OUTGOING REQUEST (Try=1)
2024-04-26T19:51:09.887+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    GET https://management.azure.com/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/deployments/latest?api-version=2022-03-01&deployer=REDACTED&time=REDACTED
2024-04-26T19:51:09.887+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Authorization: REDACTED
2024-04-26T19:51:09.887+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    User-Agent: HashiCorp Terraform/1.4.5 (+https://www.terraform.io) terraform-provider-azapi/v1.13.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
2024-04-26T19:51:09.887+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Correlation-Request-Id: b3f9228e-d990-398e-2459-56228a9259ea
2024-04-26T19:51:09.888+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Request contained no body
2024-04-26T19:51:09.888+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: 
2024-04-26T19:51:10.048+0100 [TRACE] dag/walk: vertex "root" is waiting for "provider[\"registry.terraform.io/azure/azapi\"] (close)"
module.functions.azapi_resource.shortclip_function_code_deploy: Still creating... [20s elapsed]
2024-04-26T19:51:10.396+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.396784 Response: ==> REQUEST/RESPONSE (Try=1/509.580625ms, OpTime=509.663125ms) -- RESPONSE RECEIVED
2024-04-26T19:51:10.396+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    GET https://management.azure.com/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/deployments/latest?api-version=2022-03-01&deployer=REDACTED&time=REDACTED
2024-04-26T19:51:10.396+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Authorization: REDACTED
2024-04-26T19:51:10.396+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    User-Agent: HashiCorp Terraform/1.4.5 (+https://www.terraform.io) terraform-provider-azapi/v1.13.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
2024-04-26T19:51:10.396+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Correlation-Request-Id: b3f9228e-d990-398e-2459-56228a9259ea
2024-04-26T19:51:10.396+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    --------------------------------------------------------------------------------
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    RESPONSE Status: 200 OK
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Cache-Control: no-cache
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Content-Length: 912
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Content-Type: application/json; charset=utf-8
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Date: Fri, 26 Apr 2024 18:51:09 GMT
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Expires: -1
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Pragma: no-cache
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Server: Microsoft-IIS/10.0
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Set-Cookie: REDACTED
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Strict-Transport-Security: max-age=31536000; includeSubDomains
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Vary: Accept-Encoding
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Aspnet-Version: REDACTED
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Content-Type-Options: nosniff
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Correlation-Request-Id: b3f9228e-d990-398e-2459-56228a9259ea
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Ratelimit-Remaining-Subscription-Reads: 11980
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Request-Id: 0219e70c-3e83-4205-a2c2-e45edba22542
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Routing-Request-Id: UKSOUTH:20240426T185110Z:0219e70c-3e83-4205-a2c2-e45edba22542
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Powered-By: REDACTED
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    --------------------------------------------------------------------------------
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: {"id":"/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/deployments/latest","name":"up13-dev-func-shortclip/latest","type":"Microsoft.Web/sites/deployments","location":"UK South","properties":{"id":"temp-4ef033f1","status":3,"status_text":"","author_email":"N/A","author":"N/A","deployer":"Push-Deployer","message":"Deploying from pushed zip file","progress":"","received_time":"2024-04-26T18:50:58.6083641Z","start_time":"2024-04-26T18:50:58.6083641Z","end_time":"2024-04-26T18:51:01.0864177Z","last_success_end_time":null,"complete":true,"active":false,"is_temp":true,"is_readonly":false,"url":"https://up13-dev-func-shortclip.scm.azurewebsites.net/api/deployments/temp-4ef033f1","log_url":"https://up13-dev-func-shortclip.scm.azurewebsites.net/api/deployments/temp-4ef033f1/log","site_name":"up13-dev-func-shortclip"}}
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    --------------------------------------------------------------------------------
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: 
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Live traffic: {"request":{"headers":{"Authorization":"REDACTED","User-Agent":"HashiCorp Terraform/1.4.5 (+https://www.terraform.io) terraform-provider-azapi/v1.13.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820","X-Ms-Correlation-Request-Id":"b3f9228e-d990-398e-2459-56228a9259ea"},"method":"GET","url":"https://management.azure.com/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/deployments/latest?api-version=2022-03-01\u0026deployer=Push-Deployer\u0026time=2024-04-26_18-50-59Z","body":""},"response":{"statusCode":200,"headers":{"Cache-Control":"no-cache","Content-Length":"912","Content-Type":"application/json; charset=utf-8","Date":"Fri, 26 Apr 2024 18:51:09 GMT","Expires":"-1","Pragma":"no-cache","Server":"Microsoft-IIS/10.0,Kestrel","Set-Cookie":"ARRAffinity=bc25927b6f24df5c3c9f42ca7841b4b93113ccddd083caab860f43a88320e2f0;Path=/;HttpOnly;Secure;Domain=up13-dev-func-shortclip.scm.azurewebsites.net,ARRAffinitySameSite=bc25927b6f24df5c3c9f42ca7841b4b93113ccddd083caab860f43a88320e2f0;Path=/;HttpOnly;SameSite=None;Secure;Domain=up13-dev-func-shortclip.scm.azurewebsites.net","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":"b3f9228e-d990-398e-2459-56228a9259ea","X-Ms-Ratelimit-Remaining-Subscription-Reads":"11980","X-Ms-Request-Id":"0219e70c-3e83-4205-a2c2-e45edba22542","X-Ms-Routing-Request-Id":"UKSOUTH:20240426T185110Z:0219e70c-3e83-4205-a2c2-e45edba22542","X-Powered-By":"ASP.NET"},"body":"{\"id\":\"/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/deployments/latest\",\"name\":\"up13-dev-func-shortclip/latest\",\"type\":\"Microsoft.Web/sites/deployments\",\"location\":\"UK South\",\"properties\":{\"id\":\"temp-4ef033f1\",\"status\":3,\"status_text\":\"\",\"author_email\":\"N/A\",\"author\":\"N/A\",\"deployer\":\"Push-Deployer\",\"message\":\"Deploying from pushed zip file\",\"progress\":\"\",\"received_time\":\"2024-04-26T18:50:58.6083641Z\",\"start_time\":\"2024-04-26T18:50:58.6083641Z\",\"end_time\":\"2024-04-26T18:51:01.0864177Z\",\"last_success_end_time\":null,\"complete\":true,\"active\":false,\"is_temp\":true,\"is_readonly\":false,\"url\":\"https://up13-dev-func-shortclip.scm.azurewebsites.net/api/deployments/temp-4ef033f1\",\"log_url\":\"https://up13-dev-func-shortclip.scm.azurewebsites.net/api/deployments/temp-4ef033f1/log\",\"site_name\":\"up13-dev-func-shortclip\"}}"}}
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.396867 Retry: response 200
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.396871 Retry: exit due to non-retriable status code
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.396928 LongRunningOperation: State Succeeded
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.396937 LongRunningOperation: END PollUntilDone() for *loc.Poller[interface {}]: succeeded, total time: 11.053806166s
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.396983 Retry: =====> Try=1
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.397011 Request: ==> OUTGOING REQUEST (Try=1)
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    GET https://management.azure.com/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/extensions/ZipDeploy?api-version=2022-03-01
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Accept: application/json
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Authorization: REDACTED
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    User-Agent: HashiCorp Terraform/1.4.5 (+https://www.terraform.io) terraform-provider-azapi/v1.13.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Correlation-Request-Id: b3f9228e-d990-398e-2459-56228a9259ea
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Request contained no body
2024-04-26T19:51:10.397+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: 
2024-04-26T19:51:10.735+0100 [TRACE] dag/walk: vertex "module.functions (close)" is waiting for "module.functions.azapi_resource.shortclip_function_code_deploy"
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.868182 Response: ==> REQUEST/RESPONSE (Try=1/471.028125ms, OpTime=471.041334ms) -- RESPONSE RECEIVED
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    GET https://management.azure.com/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/extensions/ZipDeploy?api-version=2022-03-01
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Accept: application/json
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Authorization: REDACTED
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    User-Agent: HashiCorp Terraform/1.4.5 (+https://www.terraform.io) terraform-provider-azapi/v1.13.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Correlation-Request-Id: b3f9228e-d990-398e-2459-56228a9259ea
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    --------------------------------------------------------------------------------
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    RESPONSE Status: 404 Not Found
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Cache-Control: no-cache
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Content-Length: 38
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Content-Type: application/json; charset=utf-8
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Date: Fri, 26 Apr 2024 18:51:10 GMT
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Expires: -1
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Pragma: no-cache
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Server: Microsoft-IIS/10.0
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Set-Cookie: REDACTED
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Strict-Transport-Security: max-age=31536000; includeSubDomains
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    Vary: Accept-Encoding
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Aspnet-Version: REDACTED
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Content-Type-Options: nosniff
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Correlation-Request-Id: b3f9228e-d990-398e-2459-56228a9259ea
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Ratelimit-Remaining-Subscription-Reads: 11979
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Request-Id: abcc28e7-5629-49b1-b309-be5bd7dad38b
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Ms-Routing-Request-Id: UKSOUTH:20240426T185111Z:abcc28e7-5629-49b1-b309-be5bd7dad38b
2024-04-26T19:51:10.868+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    X-Powered-By: REDACTED
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    --------------------------------------------------------------------------------
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: "No route registered for '/ZipDeploy'"
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0:    --------------------------------------------------------------------------------
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: 
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Live traffic: {"request":{"headers":{"Accept":"application/json","Authorization":"REDACTED","User-Agent":"HashiCorp Terraform/1.4.5 (+https://www.terraform.io) terraform-provider-azapi/v1.13.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820","X-Ms-Correlation-Request-Id":"b3f9228e-d990-398e-2459-56228a9259ea"},"method":"GET","url":"https://management.azure.com/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/extensions/ZipDeploy?api-version=2022-03-01","body":""},"response":{"statusCode":404,"headers":{"Cache-Control":"no-cache","Content-Length":"38","Content-Type":"application/json; charset=utf-8","Date":"Fri, 26 Apr 2024 18:51:10 GMT","Expires":"-1","Pragma":"no-cache","Server":"Microsoft-IIS/10.0,Kestrel","Set-Cookie":"ARRAffinity=bc25927b6f24df5c3c9f42ca7841b4b93113ccddd083caab860f43a88320e2f0;Path=/;HttpOnly;Secure;Domain=up13-dev-func-shortclip.scm.azurewebsites.net,ARRAffinitySameSite=bc25927b6f24df5c3c9f42ca7841b4b93113ccddd083caab860f43a88320e2f0;Path=/;HttpOnly;SameSite=None;Secure;Domain=up13-dev-func-shortclip.scm.azurewebsites.net","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":"b3f9228e-d990-398e-2459-56228a9259ea","X-Ms-Ratelimit-Remaining-Subscription-Reads":"11979","X-Ms-Request-Id":"abcc28e7-5629-49b1-b309-be5bd7dad38b","X-Ms-Routing-Request-Id":"UKSOUTH:20240426T185111Z:abcc28e7-5629-49b1-b309-be5bd7dad38b","X-Powered-By":"ASP.NET"},"body":"\"No route registered for '/ZipDeploy'\""}}
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.868308 Retry: response 404
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.868314 Retry: exit due to non-retriable status code
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: [DEBUG] Apr 26 19:51:10.868896 ResponseError: GET https://management.azure.com/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/extensions/ZipDeploy
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: --------------------------------------------------------------------------------
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: RESPONSE 404: 404 Not Found
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: ERROR CODE UNAVAILABLE
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: --------------------------------------------------------------------------------
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: "No route registered for '/ZipDeploy'"
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: --------------------------------------------------------------------------------
2024-04-26T19:51:10.869+0100 [DEBUG] provider.terraform-provider-azapi_v1.13.0: 
2024-04-26T19:51:10.869+0100 [INFO]  provider.terraform-provider-azapi_v1.13.0: Error reading "/subscriptions/be25820a-df86-4794-9e95-6a45cd5c0941/resourceGroups/up13-dev-ingestion/providers/Microsoft.Web/sites/up13-dev-func-shortclip/extensions/ZipDeploy" - removing from state: @module=azapi tf_rpc=ApplyResourceChange @caller=github.com/Azure/terraform-provider-azapi/internal/services/azapi_resource.go:539 tf_provider_addr=registry.terraform.io/Azure/azapi tf_req_id=7de4f45e-ec00-0aa3-68df-c381acdff213 tf_resource_type=azapi_resource timestamp=2024-04-26T19:51:10.868+0100
2024-04-26T19:51:10.869+0100 [TRACE] provider.terraform-provider-azapi_v1.13.0: Called provider defined Resource Create: tf_req_id=7de4f45e-ec00-0aa3-68df-c381acdff213 tf_resource_type=azapi_resource @caller=github.com/hashicorp/terraform-plugin-framework@v1.7.0/internal/fwserver/server_createresource.go:102 @module=sdk.framework tf_provider_addr=registry.terraform.io/Azure/azapi tf_rpc=ApplyResourceChange timestamp=2024-04-26T19:51:10.869+0100
2024-04-26T19:51:10.870+0100 [TRACE] provider.terraform-provider-azapi_v1.13.0: Received downstream response: tf_provider_addr=registry.terraform.io/Azure/azapi tf_req_duration_ms=20790 tf_req_id=7de4f45e-ec00-0aa3-68df-c381acdff213 tf_resource_type=azapi_resource @caller=github.com/hashicorp/terraform-plugin-go@v0.22.1/tfprotov6/internal/tf6serverlogging/downstream_request.go:42 @module=sdk.proto diagnostic_warning_count=0 tf_proto_version=6.4 tf_rpc=ApplyResourceChange diagnostic_error_count=1 timestamp=2024-04-26T19:51:10.869+0100
2024-04-26T19:51:10.870+0100 [ERROR] provider.terraform-provider-azapi_v1.13.0: Response contains error diagnostic: diagnostic_severity=ERROR tf_resource_type=azapi_resource tf_rpc=ApplyResourceChange tf_proto_version=6.4 tf_provider_addr=registry.terraform.io/Azure/azapi @caller=github.com/hashicorp/terraform-plugin-go@v0.22.1/tfprotov6/internal/diag/diagnostics.go:58 @module=sdk.proto diagnostic_detail="The Terraform Provider unexpectedly returned no resource state after having no errors in the resource creation. This is always an issue in the Terraform Provider and should be reported to the provider developers.

The resource may have been successfully created, but Terraform is not tracking it. Applying the configuration again with no other action may result in duplicate resource errors. Import the resource if the resource was actually created and Terraform should be tracking it." diagnostic_summary="Missing Resource State After Create" tf_req_id=7de4f45e-ec00-0aa3-68df-c381acdff213 timestamp=2024-04-26T19:51:10.869+0100
2024-04-26T19:51:10.870+0100 [TRACE] provider.terraform-provider-azapi_v1.13.0: Served request: tf_proto_version=6.4 tf_req_id=7de4f45e-ec00-0aa3-68df-c381acdff213 tf_resource_type=azapi_resource @caller=github.com/hashicorp/terraform-plugin-go@v0.22.1/tfprotov6/tf6server/server.go:859 @module=sdk.proto tf_provider_addr=registry.terraform.io/Azure/azapi tf_rpc=ApplyResourceChange timestamp=2024-04-26T19:51:10.869+0100
2024-04-26T19:51:10.870+0100 [TRACE] maybeTainted: module.functions.azapi_resource.shortclip_function_code_deploy encountered an error during creation, so it is now marked as tainted
2024-04-26T19:51:10.870+0100 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState to workingState for module.functions.azapi_resource.shortclip_function_code_deploy
2024-04-26T19:51:10.870+0100 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState: removing state object for module.functions.azapi_resource.shortclip_function_code_deploy
2024-04-26T19:51:10.870+0100 [TRACE] evalApplyProvisioners: module.functions.azapi_resource.shortclip_function_code_deploy is tainted, so skipping provisioning
2024-04-26T19:51:10.870+0100 [TRACE] maybeTainted: module.functions.azapi_resource.shortclip_function_code_deploy was already tainted, so nothing to do
2024-04-26T19:51:10.870+0100 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState to workingState for module.functions.azapi_resource.shortclip_function_code_deploy
2024-04-26T19:51:10.870+0100 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState: removing state object for module.functions.azapi_resource.shortclip_function_code_deploy
2024-04-26T19:51:10.871+0100 [TRACE] statemgr.Filesystem: have already backed up original terraform.tfstate to terraform.tfstate.backup on a previous write
2024-04-26T19:51:10.879+0100 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 1113
2024-04-26T19:51:10.879+0100 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
2024-04-26T19:51:10.893+0100 [ERROR] vertex "module.functions.azapi_resource.shortclip_function_code_deploy" error: Missing Resource State After Create
2024-04-26T19:51:10.893+0100 [TRACE] vertex "module.functions.azapi_resource.shortclip_function_code_deploy": visit complete, with errors
2024-04-26T19:51:10.893+0100 [TRACE] dag/walk: upstream of "module.functions (close)" errored, so skipping
2024-04-26T19:51:10.893+0100 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/azure/azapi\"] (close)" errored, so skipping
2024-04-26T19:51:10.893+0100 [TRACE] dag/walk: upstream of "root" errored, so skipping
2024-04-26T19:51:10.893+0100 [TRACE] statemgr.Filesystem: have already backed up original terraform.tfstate to terraform.tfstate.backup on a previous write
2024-04-26T19:51:10.900+0100 [TRACE] statemgr.Filesystem: state has changed since last snapshot, so incrementing serial to 1114
2024-04-26T19:51:10.900+0100 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
╷
│ Error: Missing Resource State After Create
│ 
│   with module.functions.azapi_resource.shortclip_function_code_deploy,
│   on modules/functions/functions.tf line 162, in resource "azapi_resource" "shortclip_function_code_deploy":
│  162: resource "azapi_resource" "shortclip_function_code_deploy" {
│ 
│ The Terraform Provider unexpectedly returned no resource state after having no errors in the resource creation. This is always an issue in the Terraform Provider and should be
│ reported to the provider developers.
│ 
│ The resource may have been successfully created, but Terraform is not tracking it. Applying the configuration again with no other action may result in duplicate resource errors.
│ Import the resource if the resource was actually created and Terraform should be tracking it.
╵
2024-04-26T19:51:10.911+0100 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2024-04-26T19:51:10.911+0100 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock
2024-04-26T19:51:10.913+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-04-26T19:51:10.914+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/azure/azapi/1.13.0/darwin_arm64/terraform-provider-azapi_v1.13.0 pid=12310
2024-04-26T19:51:10.914+0100 [DEBUG] provider: plugin exited

Expected Behaviour

AZAPI provider to deploy

Actual Behaviour

The Terraform Provider unexpectedly returned no resource state after having no errors in the resource creation. This is always an issue in the Terraform Provider and should be
│ reported to the provider developers.

│ The resource may have been successfully created, but Terraform is not tracking it. Applying the configuration again with no other action may result in duplicate resource errors.
│ Import the resource if the resource was actually created and Terraform should be tracking it.

Steps to Reproduce

resource "azapi_resource" "shortclip_function_code_deploy" {
schema_validation_enabled = false
type = "Microsoft.Web/sites/extensions@2022-03-01"
name = "/ZipDeploy"
parent_id = azurerm_linux_function_app.shortclip_function.id
location = var.location
body = jsonencode({
properties = {
"packageUri" : "https://github.com/Azure/ai-hub/raw/main/infrastructure/terraform/modules/functions/rag.zip"
"appOffline" : true
}
})
}

Important Factoids

No response

References

No response

@uday31in uday31in changed the title zip_deploy_file publishing failed with status code 401 Unauthorized azapi_resource Missing Resource State After Create forMicrosoft.Web/sites/extensions@2022-03-01 Apr 26, 2024
@mybayern1974
Copy link
Collaborator

Thank @uday31in for filing this issue. Given this repo is for Terraform AzureRM provider, I'm copying your issue to the Terraform AzAPI repo as here to make it be well tracked. With that I'm closing this issue. Or let me know if you have any questions or concerns. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants