Skip to content

azurerm_resource_deployment_script_azure_cli hangs on create #30607

@wasabii

Description

@wasabii

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 comments along the lines of "+1", "me too" or "any updates", 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.2

AzureRM Provider Version

4.43.0

Affected Resource(s)/Data Source(s)

azurerm_resource_deployment_script_azure_cli

Terraform Configuration Files

resource azurerm_resource_deployment_script_azure_cli mssql_sqlcmd {
  name = "${var.default_name}-sqlcmd"
  tags = local.tags
  resource_group_name = azurerm_resource_group.default.name
  location = var.resource_location
  
  version = "2.75.0"
  retention_interval = "P1D"
  cleanup_preference = "OnSuccess"
  force_update_tag = "1"
  timeout = "PT5M"
  
  script_content = <<EOF
    set -e
    echo "{}" > $AZ_SCRIPTS_OUTPUT_PATH
  EOF
  
  identity {
    type = "UserAssigned"
    identity_ids = [
      azurerm_user_assigned_identity.sqladmin.id
    ]
  }

  timeouts {
    create = "5m"
  }

  depends_on = [
    azurerm_mssql_firewall_rule.default_AllowAllWindowsAzureIps,
    azurerm_mssql_database.oajf
  ]
}

Debug Output/Panic Output

https://gist.github.com/wasabii/a0b983e97c5a89db7d84a614f58dfa5c

This is not complete, since its huge. But the last couple repeated calls to wait on the CLI resource are.

Expected Behaviour

Should complete.

Actual Behaviour

Just hangs forever until timeouts are reached.

Steps to Reproduce

No response

Important Factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions