Skip to content

Commit

Permalink
Tag all resources ceated by the module (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
smerrell authored and metacpp committed Oct 1, 2018
1 parent ca710c6 commit c391e10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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" {
Expand All @@ -264,6 +266,8 @@ resource "azurerm_network_security_group" "vm" {
source_address_prefix = "*"
destination_address_prefix = "*"
}

tags = "${var.tags}"
}

resource "azurerm_network_interface" "vm" {
Expand All @@ -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}"
}

0 comments on commit c391e10

Please sign in to comment.