Environments - Terraform and Azure PaaS
  • 07 Nov 2019
  • 1 Minute to read
  • Contributors
  • Comment
  • Dark
    Light
  • PDF

Environments - Terraform and Azure PaaS

  • Comment
  • Dark
    Light
  • PDF

Article summary

In the example scenario used to help illustrate how to use Terraform with Azure PaaS I will use the environments outlines in the below table.

EnvironmentPurposeActions performed by
Local DevelopmentThis is a resource group that is shared by developers working on the Visual Studio solution. The developer will setup the infrastructure and then deploy from Visual Studio changes as required to be able to test themDeveloper from dev machine
BuildThis is a resource group used by the Build process to implement continuous integration so that every check in results in a build which will setup everything in this resource group to the latest and run some automated tests on itBuild Pipeline in Azure DevOps
TestThis is a resource group which is used by the release process. A successful build may result in a release being performed. The release would configure the resource group to match the Azure setup from that build and then deploy the code, etc. Multiple test environments could exist each with their own resource group and stage in a release pipelineRelease pipeline in Azure DevOps
ProductionThis is the production environment which is a resource group where the production assets will be setup. A release pipeline will have a stage which sets this up and deploys the latest codeRelease pipeline in Azure DevOps

Points to note:

  • I am using a resource group for each environment. You could use multiple resource groups in 1 environment in more complex scenarios
  • You may have resource groups in different subscriptions
  • It is not recommended to share a resource group for multiple environments. It can be done but often leads to confusion

Was this article helpful?