Skip to content
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

Timeouts for data azurerm_role_definition not working #28582

Open
1 task done
globallogic-dc opened this issue Jan 23, 2025 · 1 comment
Open
1 task done

Timeouts for data azurerm_role_definition not working #28582

globallogic-dc opened this issue Jan 23, 2025 · 1 comment

Comments

@globallogic-dc
Copy link

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.10.4

AzureRM Provider Version

v4.13.0-v4.16

Affected Resource(s)/Data Source(s)

azurerm_role_definition

Terraform Configuration Files

data "azurerm_role_definition" "role_defs" {
  for_each = toset(["Reader1", "Contributor1"])

  name  = each.value
  scope = "/subscriptions/<subscription_id>"

  timeouts {
    read = "1m"
  }
}

Debug Output/Panic Output

module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [10s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [20s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [30s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [40s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [50s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [1m0s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [1m10s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [1m20s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [1m30s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [1m40s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [1m50s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [2m0s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [2m10s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [2m20s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [2m30s elapsed]
module.resource-group.data.azurerm_role_definition.role_defs["Reader1"]: Still reading... [2m40s elapsed]

Expected Behaviour

It should stop by timeout

Actual Behaviour

No response

Steps to Reproduce

Define a Terraform configuration that uses the azurerm_role_definition data with wrong name and source with a timeouts block:
data "azurerm_role_definition" "role_defs" {
for_each = toset(["Reader", "Contributor"])

name = each.value
scope = "/subscriptions/<subscription_id>"

timeouts {
read = "1m"
}
}
Apply the configuration with terraform apply.

Important Factoids

No response

References

No response

@wuxu92
Copy link
Contributor

wuxu92 commented Jan 24, 2025

Hi @globallogic-dc,

Thanks for bringing this up. It's a known issue with the Terraform Plugin SDK v2: GitHub Issue #1038. You can subscribe to that issue for updates. Unfortunately, the Plugin SDK v2 is not actively maintained, so it may take longer to resolve. However, AzureRM might migrate to the Terraform Framework SDK in the future, which could automatically fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants