From ba67f790e052bf7f5812a4a33d8a04ef8676b395 Mon Sep 17 00:00:00 2001 From: Bin Xia Date: Sat, 27 Oct 2018 12:48:14 +0000 Subject: [PATCH] Workaround: sleep 30s before assigning role https://github.com/terraform-providers/terraform-provider-azurerm/issues/1635 --- terraform/user_assigned_identity.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/terraform/user_assigned_identity.tf b/terraform/user_assigned_identity.tf index cd512b3..c5c6351 100644 --- a/terraform/user_assigned_identity.tf +++ b/terraform/user_assigned_identity.tf @@ -2,6 +2,11 @@ resource "azurerm_user_assigned_identity" "identity" { resource_group_name = "${azurerm_resource_group.bosh_resource_group.name}" location = "${var.location}" name = "${var.env_name}" + + # wait 30s for server replication before attempting role assignment creation + provisioner "local-exec" { + command = "sleep 30" + } } resource "azurerm_role_assignment" "assignment" {