TransWikia.com

how to run terraform azure infrastructure code to create environment

Server Fault Asked by dagda1 on December 30, 2020

At the moment, I am running my terraform from my laptop which is obviously less than ideal:

module "eu_resource_group" {
  source                        = "./modules/resource_groups"

  resource_group_name           = var.resource_group_name
  resource_group_location       = var.location
}

module "vault" {
  source                        = "./modules/vault"

  resource_group_name           = module.eu_resource_group.eu_resource_group_name
  resource_group_location       = module.eu_resource_group.eu_resource_group_location
}

module "storage" {
  source                        = "./modules/storage"

  resource_group_name           = module.eu_resource_group.eu_resource_group_name
  resource_group_location       = module.eu_resource_group.eu_resource_group_location

  storage_account_name          = var.storage_account_name
  storage_container_name        = var.storage_container_name
}

I would like to run this from azure.

How would I run this from azure. Creating an azure devops project creates a CI pipeline etc.

How are people running their terraform infrastructure code in a non-local environment?

One Answer

Basically, yes - you need to create new Azure DevOps pipeline and configure everything there (code location, secrets, service principal, etc.). There a lot of step-by-step guides, like this (medium) or this one (azure devops labs). Also, don't forget about storing Terraform remote state on Azure.

Answered by Dmitry Kutetsky on December 30, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP