terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

azurerm_storage_management_policy data source does not work

Open hillen opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, 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

Terraform Version

1.2.4

AzureRM Provider Version

3.13.0

Affected Resource(s)/Data Source(s)

azurerm_storage_management_policy

Terraform Configuration Files

data "azurerm_storage_account" "example" {
  name                = var.storage_account_name
  resource_group_name = var.resource_group
}

data "azurerm_storage_management_policy" "example" {
  storage_account_id = data.azurerm_storage_account.example.id
}

output "storage_management_policy" {
  value = data.azurerm_storage_management_policy.example
}

Debug Output/Panic Output

Error: Storage Account Management Policy: (Management Policy Name "default" / Storage Account Name "..." / Resource Group "...") was not found
│ 
│   with data.azurerm_storage_management_policy.example,
│   on main.tf line 273, in data "azurerm_storage_management_policy" "example":
│  273: data "azurerm_storage_management_policy" "example" {

Expected Behaviour

Expect the storage account management policy to be in the output.

Actual Behaviour

Error that the Storage Account Management Policy could not be found

Steps to Reproduce

run terraform plan with the above terraform

Important Factoids

No response

References

No response

hillen avatar Jul 09 '22 07:07 hillen