Skip to content

Commit

Permalink
Merge pull request #23 from terraform-google-modules/bugfix/output-map
Browse files Browse the repository at this point in the history
Fix bug in outputs when removing buckets
  • Loading branch information
Aaron Lane authored Nov 20, 2019
2 parents 2d968b5 + 09f8be9 commit a153472
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Make will use bash instead of sh
SHELL := /usr/bin/env bash

DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.1.0
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.6.0
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
REGISTRY_URL := gcr.io/cloud-foundation-cicd

Expand Down
5 changes: 4 additions & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ steps:
- 'TF_VAR_org_id=$_ORG_ID'
- 'TF_VAR_folder_id=$_FOLDER_ID'
- 'TF_VAR_billing_account=$_BILLING_ACCOUNT'
- id: sleep
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'sleep 120']
- id: create
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create']
Expand All @@ -38,4 +41,4 @@ tags:
- 'integration'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.1.0'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.6.0'
15 changes: 9 additions & 6 deletions build/lint.cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,9 +13,12 @@
# limitations under the License.

steps:
- name: "gcr.io/cloud-foundation-cicd/cft/developer-tools:0.0.1"
id: "lint"
args: ["/usr/local/bin/test_lint.sh"]
- id: 'lint-tests'
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/usr/local/bin/test_lint.sh']
tags:
- "ci"
- "lint"
- 'ci'
- 'lint'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.6.0'
2 changes: 1 addition & 1 deletion examples/simple_example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

provider "google" {
version = "~> 2.0"
version = "~> 2.18.0"
}

module "cloud_storage" {
Expand Down
4 changes: 2 additions & 2 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ output "buckets" {

output "names" {
description = "Bucket names."
value = zipmap(var.names, google_storage_bucket.buckets[*].name)
value = zipmap(var.names, slice(google_storage_bucket.buckets[*].name, 0, length(var.names)))
}

output "urls" {
description = "Bucket URLs."
value = zipmap(var.names, google_storage_bucket.buckets[*].url)
value = zipmap(var.names, slice(google_storage_bucket.buckets[*].url, 0, length(var.names)))
}

output "names_list" {
Expand Down
4 changes: 4 additions & 0 deletions test/setup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* limitations under the License.
*/

provider "google" {
version = "~> 2.18.0"
}

terraform {
required_version = ">= 0.12"
}

0 comments on commit a153472

Please sign in to comment.