We are relatively new to managing our Azure resources with Terraform Cloud and are running into a few bumps in the road which I guess others would have run into in their journeys. Any guidance would be much appreciated.
We are using Terraform Cloud(TFC).
We have three azure subscriptions - Test, Stage, Prod
We have three TFC workspaces - Test, Stage, Prod
We have three long lived branches - Test, Stage, Prod
Our workflow goes Test → Stage → Prod
On paper this seems reasonable and with one person working in this way it all runs smoothly. The first problem we’ve run into is.
What do we do if one person is testing something in the Test subscription which may take a week to test and someone else in the meantime wants to make a small change to an existing resource?
In our case we have someone running a proof of concept with Grafana and InfluxDB which includes records deployed in an application gateway…
…and someone else now wants to change a records in the application gateway.
If the second person makes the change and then wants to rebase the test branch onto stage it’s going to deploy the Grafana and InfluxDB and the application gateway record into stage which is not wanted?
I looked at the Blue Green deployment blog post which uses a boolean toggle to set the count on a resource to 1 or 0 and maybe we could use something like that but we have three environments?
I might not be thinking about it right but if we tried to use a similar approach to blue green we’d need a lot of if…then or similar to mask out the unwanted resources.
Any thoughts??
Cheers
Phill