-
Notifications
You must be signed in to change notification settings - Fork 11
Bedrock should allow for BYO resource group #474
Comments
Locking resource groups seems to work. https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-lock-resources @evillgenius75 verified that deploying through Terraform to a resource group that is:
|
Another method is to easily add a lifecycle hook to the resource group stanza in Terraform to add:
Then on destroy append the This will effectively lock the state file on destroy for the RG |
@evillgenius75 while true, take a look at this open issue -- hashicorp/terraform#17599 There still is a risk of RG deletion. |
I'll have a checked in first pass solution in about an hour. Just running through all the environments. I will need to add docs too. |
@jmspring with that in mind we should then conform to the Azure 2.0 provider process which will require strict import of any resources. Since this will be the new provider soon it would be better we not make code changes to allow for existing RG's through the template process as this is a bad process taking advantage of a known bad issue with the current provider. We should only allow existing RGs through an explicit import process : |
@evillgenius75 - So with the 2.0 provider, if one declares a |
@jmspring that is correct, that will be the new functionality in the Azure 2.0 provider as I understand it. I would double check with Tom Harvey to be certain, but that is the indication moving forward. |
@evillgenius75 - re: the environment variable. I still that approach is quite error prone. Specifically because it requires the user the ensure that the variable is set every time they open a console window and are interacting with resources via TF. I know, personally, I'm bound to open multiple terminal windows and don't always have ENV vars set consistently (activating a service principal settings, etc). Additionally, re: the 2.0 behavior of importing, there will still be required education and understanding to what that means. There could be a case where an RG is imported when the desire is not to do so. |
) Add bring your own resource group support - closes #474
As a: SRE
I want: to be able to bring my own resource group
So that: Terraform can use my resource group and not delete it upon a Terraform delete.
Does this require updates to documentation?: Yes, there will be a new boolean in the terraform variables file for each environment such that one can toggle on/off resource group management
The text was updated successfully, but these errors were encountered: