Terraform-provider-azurerm: azurerm_security_center_workspace failed after 15m timeout

Created on 19 Jan 2019  ·  6Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Hi,

I am encountering error when the first security_workspace always fail after 15minutes. However it is success on 2nd run.
I have tested this multiple times and it is consitent result and always failed in first run. does anyone encounter the same behaviour also ?

regards,
Rk

Terraform (and AzureRM Provider) Version

Terraform 0.11.10
AzureRM 1.21

Affected Resource(s)

  • azurerm_security_center_workspace

Actual Behavior

module.securitycenter.azurerm_security_center_workspace.sc: Still creating... (14m50s elapsed)
module.securitycenter.azurerm_security_center_workspace.sc: Still creating... (15m0s elapsed)

Error: Error applying plan:

1 error(s) occurred:

  • module.securitycenter.azurerm_security_center_workspace.sc: 1 error(s) occurred:

  • azurerm_security_center_workspace.sc: Error waiting: timeout while waiting for state to become 'Populated' (last state: 'Waiting', timeout: 15m0s)

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Expected Behavior

  • module.securitycenter.azurerm_security_center_workspace.sc
    id:
    scope: "/subscriptions/071e5ba5-4671-4bd8-a5ff-cab54b1f1775"
    workspace_id: "/subscriptions/071e5ba5-4671-4bd8-a5ff-cab54b1f1775/resourcegroups/rsg-pru1-hub-az1-omssecuritycenter/providers/microsoft.operationalinsights/workspaces/law-pru1-hub-az1-ommsecuritycenter"
    Plan: 1 to add, 0 to change, 0 to destroy.

module.securitycenter.azurerm_security_center_workspace.sc: Still creating... (14m50s elapsed)
module.securitycenter.azurerm_security_center_workspace.sc: Still creating... (15m0s elapsed)
module.securitycenter.azurerm_security_center_workspace.sc: Creation complete after 15m5s (ID: /subscriptions/071e5ba5-4671-4bd8-a5ff-...oft.Security/workspaceSettings/default)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

Steps to Reproduce

  1. terraform apply
bug servicsecurity-center

All 6 comments

I also hit this multiple times last week @ranokarno

I haven't testing this manually from azure portal, but i think something is limiting the timeout to 15m, eventhough the status still waiting.

hey @ranokarno

Thanks for opening this issue :)

There's a timeout in the Terraform resource which checks that the Security Center Workspace has finished provisioning (which currently polls for 15 minutes) - since the API returns incomplete data until the resource has finished provisioning.

I've checked our test suite for the past week or so and can also see this in the logs, however from what I can see this appears to be an intermittent issue - as such I've opened PR #2724 which updates the timeout to 30 minutes, which should be sufficient time for this to finish replicating (but the tests will show this).

Thanks!

Hi @tombuildsstuff , is there any where I can configure a timeout in TF to handle this, while waiting for this patch to be generally available in TF provider?

@archmangler not yet, support for custom timeouts is on our list for 2.0 though (and is being tracked in #171) - for the moment you should be able to custom compile the provider. That said - I expect v1.22 should be out soon :)

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!

Was this page helpful?
0 / 5 - 0 ratings