From c391e10c62e2b59a014d586cb55b017fd17785c6 Mon Sep 17 00:00:00 2001 From: Sam Merrell Date: Mon, 1 Oct 2018 16:55:28 -0600 Subject: [PATCH] Tag all resources ceated by the module (#69) --- main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.tf b/main.tf index c671a9e..a5197cd 100644 --- a/main.tf +++ b/main.tf @@ -236,6 +236,7 @@ resource "azurerm_availability_set" "vm" { platform_fault_domain_count = 2 platform_update_domain_count = 2 managed = true + tags = "${var.tags}" } resource "azurerm_public_ip" "vm" { @@ -245,6 +246,7 @@ resource "azurerm_public_ip" "vm" { resource_group_name = "${azurerm_resource_group.vm.name}" public_ip_address_allocation = "${var.public_ip_address_allocation}" domain_name_label = "${element(var.public_ip_dns, count.index)}" + tags = "${var.tags}" } resource "azurerm_network_security_group" "vm" { @@ -264,6 +266,8 @@ resource "azurerm_network_security_group" "vm" { source_address_prefix = "*" destination_address_prefix = "*" } + + tags = "${var.tags}" } resource "azurerm_network_interface" "vm" { @@ -279,4 +283,6 @@ resource "azurerm_network_interface" "vm" { private_ip_address_allocation = "Dynamic" public_ip_address_id = "${length(azurerm_public_ip.vm.*.id) > 0 ? element(concat(azurerm_public_ip.vm.*.id, list("")), count.index) : ""}" } + + tags = "${var.tags}" }