From 449435b3119989c8ab17f9af1a5f073b1d3540e7 Mon Sep 17 00:00:00 2001 From: Bin Xia Date: Sat, 27 Oct 2018 12:48:14 +0000 Subject: [PATCH] Workaround: sleep 60s 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..f436db5 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 60" + } } resource "azurerm_role_assignment" "assignment" {