Skip to content

Commit

Permalink
ugrade common to Terraform 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorioland committed Dec 19, 2019
1 parent 634923c commit d6fc047
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
8 changes: 3 additions & 5 deletions tf/common/README.md
Expand Up @@ -8,13 +8,11 @@ This modules is responsible for deploying the common stuff required for the refe
Fill environment variables and run script:

```bash
$LOCATION="westeurope"
$TENANT_ID="YOUR AZURE TENANT ID"
export TF_VAR_location="francecentral"
export TF_VAR_tenant_id="<YOUR_TENANT_ID>"

# init terraform and backend storage
./init.sh

terraform apply -auto-approve \
-var location=$LOCATION \
-var tenant_id=$TENANT_ID
terraform apply -auto-approve
```
10 changes: 6 additions & 4 deletions tf/common/main.tf
Expand Up @@ -3,11 +3,13 @@ provider "azurerm" {
}

terraform {
backend "azurerm" {}
backend "azurerm" {
}
}

module "common" {
source = "git@github.com:jcorioland/terraform-azure-ref-common-module"
location = "${var.location}"
tenant_id = "${var.tenant_id}"
}
location = var.location
tenant_id = var.tenant_id
}

6 changes: 3 additions & 3 deletions tf/common/outputs.tf
@@ -1,4 +1,4 @@

output "resource_group_name" {
value = "${module.common.resource_group_name}"
}
value = module.common.resource_group_name
}

1 change: 1 addition & 0 deletions tf/common/variables.tf
Expand Up @@ -5,3 +5,4 @@ variable "location" {
variable "tenant_id" {
description = "The Azure tenant id"
}

4 changes: 4 additions & 0 deletions tf/common/versions.tf
@@ -0,0 +1,4 @@

terraform {
required_version = ">= 0.12"
}

0 comments on commit d6fc047

Please sign in to comment.