diff --git a/azure/starter-vm/terraform/provider.tf b/azure/starter-vm/terraform/provider.tf new file mode 100644 index 00000000..c89922a1 --- /dev/null +++ b/azure/starter-vm/terraform/provider.tf @@ -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}" +} diff --git a/azure/starter-vm/terraform/resource-group.tf b/azure/starter-vm/terraform/resource-group.tf new file mode 100644 index 00000000..e84ff151 --- /dev/null +++ b/azure/starter-vm/terraform/resource-group.tf @@ -0,0 +1,5 @@ +# Create a resource group +resource "azurerm_resource_group" "bdbNodeRG" { + name = "bdbNodeRG" + location = "${var.location}" +} \ No newline at end of file diff --git a/azure/starter-vm/terraform/variables.tf b/azure/starter-vm/terraform/variables.tf new file mode 100644 index 00000000..449deaf1 --- /dev/null +++ b/azure/starter-vm/terraform/variables.tf @@ -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" +}