Skip to content

Instantly share code, notes, and snippets.

@stephenweinrich
Last active January 3, 2019 14:55
Show Gist options
  • Save stephenweinrich/eda886adf5b9501948a54d899e7ee754 to your computer and use it in GitHub Desktop.
Save stephenweinrich/eda886adf5b9501948a54d899e7ee754 to your computer and use it in GitHub Desktop.
terraform azure configuration
variable "subscription_id" {}
variable "client_id" {}
variable "client_secret" {}
variable "tenant_id" {}
variable "environment" {}
# Configure the Azure Provider
provider "azurerm" {
subscription_id = "${var.subscription_id}"
client_id = "${var.client_id}"
client_secret = "${var.client_secret}"
tenant_id = "${var.tenant_id}"
}
# Create Resource Groups
resource "azurerm_resource_group" "resource-group-global" {
name = "rgp-global-contoso-${var.environment}"
location = "Central US"
}
resource "azurerm_resource_group" "resource-group-westus" {
name = "rgp-westus-contoso-${var.environment}"
location = "West US"
}
resource "azurerm_resource_group" "resource-group-eastus" {
name = "rgp-eastus-contoso-${var.environment}"
location = "East US"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment