-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Creating azurerm_redis_cache_access_policy_assignment
failing with context deadline exceeded
#25802
Comments
azurerm_redis_cache_access_policy_assignment
failing with context deadline exceeded
I am also experiencing this issue, however I am able to partly mitigate by running Terraform Version:
Logs:
Code:
(Sorry about the crappy formatting, Azure DevOps decided to flip me off today) |
@the-gabe I think I have temp work around... I ended up adding a couple sleeps and timeout and my team has not seen any issues since so far, crossing fingers resource "azurerm_redis_cache" "this" {
name = "redis_cache_example"
resource_group_name = var.resource_group_name
location = var.location
capacity = "1"
family = "P"
sku_name = "Premium"
enable_non_ssl_port = false
minimum_tls_version = "1.2"
public_network_access_enabled = false
zones = []
notify_keyspace_events = ""
redis_configuration {
enable_authentication = true
active_directory_authentication_enabled = true
}
redis_version = "6"
identity {
type = "SystemAssigned"
}
tags = {}
}
resource "time_sleep" "wait_120_access_policy" {
depends_on = [azurerm_redis_cache_access_policy_assignment.msi_access_policy]
create_duration = 120s
}
resource "azurerm_redis_cache_access_policy_assignment" "msi_access_policy" {
for_each = var.app_user_assigned_identity.name != "" ? toset(["enabled"]) : []
name = "msi_access_policy_assignment"
redis_cache_id = azurerm_redis_cache.this.id
access_policy_name = "Data Contributor"
object_id = var.app_user_assigned_identity.principal_id
object_id_alias = var.app_user_assigned_identity.name
timeouts {
create = 30m
}
depends_on = [time_sleep.wait_120_seconds]
}
resource "time_sleep" "wait_120_second_access_policy" {
depends_on = [azurerm_redis_cache_access_policy_assignment.msi_access_policy]
create_duration = 120s
}
resource "azurerm_redis_cache_access_policy_assignment" "priv_access_policy" {
for_each = var.privileged_ad_group
name = "privileged_access_policy_assignment-${each.key}"
redis_cache_id = azurerm_redis_cache.this.id
access_policy_name = "Data Contributor"
object_id = each.key
object_id_alias = each.key
timeouts {
create = 30m
}
depends_on = [time_sleep.wait_120_second_access_policy]
} |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.6.6
AzureRM Provider Version
3.100.0
Affected Resource(s)/Data Source(s)
azurerm_redis_cache_access_policy_assignment
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Both access policy assignments should of created successfully
Actual Behaviour
One of 2 access policy assignments created successfully the other failed with polling after AccessPolicyAssignmentCreateUpdate: context deadline exceeded
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: