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

azurerm_storage_container_immutability_policy has warning message "The attribute "resource_manager_id" is deprecated" #28121

Closed
1 task done
tunguyen9889 opened this issue Nov 26, 2024 · 3 comments

Comments

@tunguyen9889
Copy link

tunguyen9889 commented Nov 26, 2024

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

AzureRM Provider Version

4.x

Affected Resource(s)/Data Source(s)

azurerm_storage_container_immutability_policy

Terraform Configuration Files

resource "azurerm_storage_account" "example" {
  name                            = "examplestorageaccount"
  resource_group_name             = var.resource_group
  location                        = var.location
  account_tier                    = "Standard"
  account_replication_type        = "LRS"
  allow_nested_items_to_be_public = false
}

resource "azurerm_storage_container" "example" {
  name                  = "session"
  storage_account_id    = azurerm_storage_account.example.id
  container_access_type = "private"
}

resource "azurerm_storage_container_immutability_policy" "example" {
  storage_container_resource_manager_id = azurerm_storage_container.example.resource_manager_id
  immutability_period_in_days           = 30
  protected_append_writes_all_enabled   = false
  protected_append_writes_enabled       = true
}

Debug Output/Panic Output

│ Warning: Deprecated attribute
│ 
│   on teleport.tf line 179, in resource "azurerm_storage_container_immutability_policy" "example":
│  179:   storage_container_resource_manager_id = azurerm_storage_container.example.resource_manager_id
│ 
│ The attribute "resource_manager_id" is deprecated. Refer to the provider
│ documentation for details.
╵

Expected Behaviour

Terraform plan/apply successfully without any warning message

Actual Behaviour

Terraform plan/apply has show the warning message.

Steps to Reproduce

No response

Important Factoids

No response

References

According to https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_container_immutability_policy:

storage_container_resource_manager_id - (Required) The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.

But terraform plan/apply shows warning message about deprecated attribute.

@magodo
Copy link
Collaborator

magodo commented Nov 29, 2024

@tunguyen9889 This is a warning message on the azurerm_storage_container.example.resource_manager_id. This property will be removed in v5 of the provider, and users are expected to directly use azurerm_storage_container.example.id. Though the id of azurerm_storage_container will change from the form of "https://example.blob.core.windows.net/container" to the resource manager id, only when the resource is created using the new storage_account_id. This means in your existing workspace, the id won't work.

See #27733 for details.

For now, I suggest you continue using the existing configs. Since there are quite a few issues caused by #27733, and the team is reviewing and probably will introduce new changes in the near future.

@rcskosir
Copy link
Contributor

rcskosir commented Dec 2, 2024

Thank you for taking the time to raise this! I am going to close this with @magodo‘s response as an answer. If you have future questions, I suggest using the Community Resources, such as the Azure Provider forum.

@rcskosir rcskosir closed this as completed Dec 2, 2024
Copy link

github-actions bot commented Jan 2, 2025

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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants