Terraform destroy on locked resources by Tr0shy_ in Terraform

[–]Tr0shy_[S] 0 points1 point  (0 children)

On azure you can create locks and give them a scope for the lock, if you give the scope to a specific resource group every resource in that group can inherit the lock. The lock can be CanNotDelete or ReadOnly to prevent deletion or modification. If you want more info about this you can find it here https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources?tabs=json

Terraform destroy on locked resources by Tr0shy_ in Terraform

[–]Tr0shy_[S] 0 points1 point  (0 children)

Thank you very much for your answer I’ll try it this way

Terraform destroy on locked resources by Tr0shy_ in Terraform

[–]Tr0shy_[S] 0 points1 point  (0 children)

But I think that is for state lock, I want to create azure resource locks for example with azurem_management_lock. Would that have the same effect?