From e25cb35006e746979a6c5744414e2c15875229ac Mon Sep 17 00:00:00 2001 From: Ryan Canty Date: Thu, 5 Dec 2019 11:54:13 -0800 Subject: [PATCH 1/3] Add tags as an output to ease integration --- modules/instance_template/README.md | 1 + modules/instance_template/outputs.tf | 5 +++++ modules/instance_template/variables.tf | 4 ++-- .../preemptible_and_regular_instance_templates/variables.tf | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/instance_template/README.md b/modules/instance_template/README.md index 9ff77478..dd6b4013 100644 --- a/modules/instance_template/README.md +++ b/modules/instance_template/README.md @@ -45,5 +45,6 @@ See the [simple](../../examples/instance_template/simple) for a usage example. |------|-------------| | name | Name of instance template | | self\_link | Self-link of instance template | +| target\_tags | Tags that will be associated with instance(s) | diff --git a/modules/instance_template/outputs.tf b/modules/instance_template/outputs.tf index 8a70d0a6..ee393d75 100644 --- a/modules/instance_template/outputs.tf +++ b/modules/instance_template/outputs.tf @@ -23,3 +23,8 @@ output "name" { description = "Name of instance template" value = google_compute_instance_template.tpl.name } + +output "target_tags" { + description = "Tags that will be associated with instance(s)" + value = var.tags +} diff --git a/modules/instance_template/variables.tf b/modules/instance_template/variables.tf index 27456027..78a47112 100644 --- a/modules/instance_template/variables.tf +++ b/modules/instance_template/variables.tf @@ -170,9 +170,9 @@ variable "shielded_instance_config" { ########################### variable "access_config" { description = "Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet." - type = list(object({ + type = list(object({ nat_ip = string network_tier = string })) - default = [] + default = [] } diff --git a/modules/preemptible_and_regular_instance_templates/variables.tf b/modules/preemptible_and_regular_instance_templates/variables.tf index 8aa9bbb4..478eb8d5 100644 --- a/modules/preemptible_and_regular_instance_templates/variables.tf +++ b/modules/preemptible_and_regular_instance_templates/variables.tf @@ -141,9 +141,9 @@ variable "service_account" { ########################### variable "access_config" { description = "Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet." - type = list(object({ + type = list(object({ nat_ip = string network_tier = string })) - default = [] + default = [] } From 023cff520454e8a94784c1f0fb1ed316d848e0f7 Mon Sep 17 00:00:00 2001 From: Ryan Canty Date: Thu, 5 Dec 2019 13:19:51 -0800 Subject: [PATCH 2/3] expose tags from template --- modules/instance_template/README.md | 2 +- modules/instance_template/outputs.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/instance_template/README.md b/modules/instance_template/README.md index dd6b4013..b2412f8e 100644 --- a/modules/instance_template/README.md +++ b/modules/instance_template/README.md @@ -45,6 +45,6 @@ See the [simple](../../examples/instance_template/simple) for a usage example. |------|-------------| | name | Name of instance template | | self\_link | Self-link of instance template | -| target\_tags | Tags that will be associated with instance(s) | +| tags | Tags that will be associated with instance(s) | diff --git a/modules/instance_template/outputs.tf b/modules/instance_template/outputs.tf index ee393d75..cfc817da 100644 --- a/modules/instance_template/outputs.tf +++ b/modules/instance_template/outputs.tf @@ -24,7 +24,7 @@ output "name" { value = google_compute_instance_template.tpl.name } -output "target_tags" { +output "tags" { description = "Tags that will be associated with instance(s)" - value = var.tags + value = google_compute_instance_template.tpl.tags } From 12356a0065e017862cb5267c052b743c6ddec7ea Mon Sep 17 00:00:00 2001 From: Ryan Canty Date: Mon, 9 Dec 2019 10:06:51 -0800 Subject: [PATCH 3/3] Updated CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d3e0f3d..b491c929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [1.3.0] - 2019-12-09 + +### Added + +- Output for `tags` from `instance_template` [#33] ## [1.2.0] - 2019-11-28