Working on a project that was started by some outside developers.
They did not follow our Azure governance document, partly because we had not developed it yet.
So now we have 100 or so resources that • Don't follow our naming convention • Are in the wrong resource groups • Are in the wrong region or all of the above.
We have created a "desired state", i.e. so that for every resource we have what it should be named, the RG it is should be in, the region it should be in, etc.
However, for most resources you are not able to change many of these attributes. Bummer.
I think we can just export each resource as a template, manually change the few attributes that need to be different (see above) and then create a “new” resource based on this template.
Any gotchas? Will this work?
yes and no. some of the resources are not exportable to the said template, for some - some properties might not get exported. So you'd have to be very careful when doing this.
Your data will be lost if you do this (so it wont just rename\move those resource, it will create new ones). This may be a show stopper.
Also, exported templates are extremely low quality, I'd probably just develop a new template with whatever you need from scratch.