Skip to content

Commit 3064744

Browse files
authored
chore: update tests to use 1.0 image and update compat note (#242)
* This upgrades the docker dev tools image to from 0.13 to 1.0 * This makes the kitchen create process serial for Cloud Build * This fixes the links in the readme Co-authored-by: Awais Malik <[email protected]>
1 parent d35b23c commit 3064744

File tree

16 files changed

+62
-83
lines changed

16 files changed

+62
-83
lines changed

.github/release-please.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
releaseType: terraform-module
216
handleGHRelease: true

.github/workflows/stale.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: "Close stale issues"
216
on:
317
schedule:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.13
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.0
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ This module consists of the following submodules:
1010
See more details in each module's README.
1111

1212
## Compatibility
13-
This module is meant for use with Terraform 0.13. If you haven't
14-
[upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform
13+
This module is meant for use with Terraform 0.13+ and tested using Terraform 1.0+.
14+
If you find incompatibilities using Terraform `>=0.13`, please open an issue.
15+
16+
If you haven't [upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform
1517
0.12.x-compatible version of this module, the last released version
16-
intended for Terraform 0.12.x is [v4.5.0](https://registry.terraform.io/modules/terraform-google-modules/-sql-db/google/v4.5.0).
18+
intended for Terraform 0.12.x is [v5.0.0](https://registry.terraform.io/modules/GoogleCloudPlatform/sql-db/google/5.0.0).
1719

1820
## Upgrading
1921

build/int.cloudbuild.yaml

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ steps:
2121
- 'TF_VAR_org_id=$_ORG_ID'
2222
- 'TF_VAR_folder_id=$_FOLDER_ID'
2323
- 'TF_VAR_billing_account=$_BILLING_ACCOUNT'
24-
25-
- id: create-postgresql-public-local
24+
- id: create-all
2625
waitFor:
2726
- prepare
2827
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
29-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create postgresql-public-local']
28+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create']
29+
3030
- id: converge-postgresql-public-local
3131
waitFor:
32-
- create-postgresql-public-local
32+
- create-all
3333
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
3434
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge postgresql-public-local']
3535
timeout: 3600s
@@ -45,14 +45,9 @@ steps:
4545
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy postgresql-public-local']
4646
timeout: 1800s
4747

48-
- id: create-mssql-public-local
49-
waitFor:
50-
- prepare
51-
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
52-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create mssql-public-local']
5348
- id: converge-mssql-public-local
5449
waitFor:
55-
- create-mssql-public-local
50+
- create-all
5651
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
5752
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge mssql-public-local']
5853
timeout: 3600s
@@ -68,14 +63,9 @@ steps:
6863
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy mssql-public-local']
6964
timeout: 1800s
7065

71-
- id: create-mysql-public-local
72-
waitFor:
73-
- prepare
74-
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
75-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create mysql-public-local']
7666
- id: converge-mysql-public-local
7767
waitFor:
78-
- create-mysql-public-local
68+
- create-all
7969
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
8070
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge mysql-public-local']
8171
timeout: 3600s
@@ -91,14 +81,9 @@ steps:
9181
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy mysql-public-local']
9282
timeout: 1800s
9383

94-
- id: create-mysql-ha-local
95-
waitFor:
96-
- prepare
97-
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
98-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create mysql-ha-local']
9984
- id: converge-mysql-ha-local
10085
waitFor:
101-
- create-mysql-ha-local
86+
- create-all
10287
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
10388
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge mysql-ha-local']
10489
timeout: 3600s
@@ -114,14 +99,9 @@ steps:
11499
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy mysql-ha-local']
115100
timeout: 1800s
116101

117-
- id: create-postgresql-ha-local
118-
waitFor:
119-
- prepare
120-
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
121-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create postgresql-ha-local']
122102
- id: converge-postgresql-ha-local
123103
waitFor:
124-
- create-postgresql-ha-local
104+
- create-all
125105
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
126106
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge postgresql-ha-local']
127107
timeout: 3600s
@@ -137,14 +117,9 @@ steps:
137117
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy postgresql-ha-local']
138118
timeout: 1800s
139119

140-
- id: create-mssql-ha-local
141-
waitFor:
142-
- prepare
143-
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
144-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create mssql-ha-local']
145120
- id: converge-mssql-ha-local
146121
waitFor:
147-
- create-mssql-ha-local
122+
- create-all
148123
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
149124
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge mssql-ha-local']
150125
timeout: 3600s
@@ -160,14 +135,9 @@ steps:
160135
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy mssql-ha-local']
161136
timeout: 1800s
162137

163-
- id: create-mysql-private-local
164-
waitFor:
165-
- prepare
166-
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
167-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create mysql-private-local']
168138
- id: converge-mysql-private-local
169139
waitFor:
170-
- create-mysql-private-local
140+
- create-all
171141
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
172142
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge mysql-private-local']
173143
timeout: 3600s
@@ -188,4 +158,4 @@ tags:
188158
- 'integration'
189159
substitutions:
190160
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
191-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
161+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0'

build/lint.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ tags:
2121
- 'lint'
2222
substitutions:
2323
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
24-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
24+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0'

kitchen.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ suites:
4040
name: terraform
4141
root_module_directory: test/fixtures/postgresql-public
4242
command_timeout: 1800
43-
- name: postgresql-public-iam
44-
driver:
45-
name: terraform
46-
root_module_directory: test/fixtures/postgresql-public-iam
47-
command_timeout: 1800
4843
- name: mysql-private
4944
driver:
5045
name: terraform

test/fixtures/mysql-ha/outputs.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ output "authorized_network" {
2727
}
2828

2929
output "replicas" {
30-
value = module.example.replicas
30+
value = module.example.replicas
31+
sensitive = true
3132
}
3233

3334
output "instances" {
34-
value = module.example.instances
35+
value = module.example.instances
36+
sensitive = true
3537
}

test/fixtures/mysql-private/outputs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ output "mysql_conn" {
3232
output "mysql_user_pass" {
3333
value = module.example.mysql_user_pass
3434
description = "The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable."
35+
sensitive = true
3536
}
3637

3738
output "reserved_range_name" {

test/fixtures/mysql-public/outputs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ output "mysql_conn" {
3232
output "mysql_user_pass" {
3333
value = module.example.mysql_user_pass
3434
description = "The password for the default user. If not set, a random one will be generated and available in the generated_user_password output variable."
35+
sensitive = true
3536
}
3637

3738
output "public_ip_address" {

0 commit comments

Comments
 (0)