Add initial working Terraform config for Azure

This commit is contained in:
Troy McConaghy 2017-02-09 10:31:05 +01:00
parent ae005bfa31
commit 218c1ca4b4
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# Configure the Microsoft Azure Provider
# Why define these variables here? This is why:
# https://github.com/hashicorp/terraform/issues/7894#issuecomment-259758331
variable "subscription_id" {}
variable "client_id" {}
variable "client_secret" {}
variable "tenant_id" {}
provider "azurerm" {
subscription_id = "${var.subscription_id}"
client_id = "${var.client_id}"
client_secret = "${var.client_secret}"
tenant_id = "${var.tenant_id}"
}

View File

@ -0,0 +1,5 @@
# Create a resource group
resource "azurerm_resource_group" "bdbNodeRG" {
name = "bdbNodeRG"
location = "${var.location}"
}

View File

@ -0,0 +1,8 @@
# Use this file for Terraform variables that:
# 1) you don't mind sharing with the world on GitHub (if default provided) or
# 2) you want Terraform to ask the user for at runtime (if no default provided)
# Secret variables should be put in secret.tfvars or similar.
variable "location" {
default = "westeurope"
}