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

Bug azurerm_backup_container_storage_account should not be part of file_share

Open wasfree opened this issue 1 year 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

Version of the module you are using

5.7.6

Rover Version

N/A

Terraform Version

1.6.3

AzureRM Provider Version

No response

Affected Resource(s)/Data Source(s)

azurerm_backup_container_storage_account

Terraform Configuration Files

https://github.com/aztfmod/terraform-azurerm-caf/blob/main/modules/storage_account/file_share/file_share.tf

Moving azurerm_backup_container_storage_account in file share cause issues if you want to backup multiple file shares from same storage account. This resource is needed only once per storage account/recovery vault. Moving it down to file_share.tf will try to create it for each file share and cause "already exists - to be managed via Terraform this resource needs to be imported into the State."

Expected Behaviour

It should be possible to backup multiple file shares from same storage account.

Actual Behaviour

Since each file share creates azurerm_backup_container_storage_account resource this is not working.

Steps to Reproduce

No response

Important Factoids

No response

References

No response

wasfree avatar Nov 13 '23 14:11 wasfree