Skip to content

Commit e09ff11

Browse files
authored
fix: lint updates for dev-tools v1.16 (#1742)
1 parent cebc213 commit e09ff11

File tree

76 files changed

+2902
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2902
-297
lines changed

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 := 1.10
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.16
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424
DOCKER_BIN ?= docker

autogen/main/main.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ locals {
148148
cluster_endpoint_for_nodes = "${google_container_cluster.primary.endpoint}/32"
149149
{% endif %}
150150

151-
cluster_output_master_auth = concat(google_container_cluster.primary.*.master_auth, [])
151+
cluster_output_master_auth = concat(google_container_cluster.primary[*].master_auth, [])
152152
cluster_output_master_version = google_container_cluster.primary.master_version
153153
cluster_output_min_master_version = google_container_cluster.primary.min_master_version
154154
cluster_output_logging_service = google_container_cluster.primary.logging_service

autogen/main/sa.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
locals {
2020
service_account_list = compact(
2121
concat(
22-
google_service_account.cluster_service_account.*.email,
22+
google_service_account.cluster_service_account[*].email,
2323
["dummy"],
2424
),
2525
)

build/int.cloudbuild.yaml

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,19 @@ steps:
2121
- 'TF_VAR_org_id=$_ORG_ID'
2222
- 'TF_VAR_folder_id=$_FOLDER_ID'
2323
- 'TF_VAR_billing_account=$_BILLING_ACCOUNT'
24-
- id: create all
24+
- id: init-all
2525
waitFor:
2626
- prepare
2727
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
28+
args: ['/bin/bash', '-c', 'cft test run all --stage init --verbose']
29+
- id: create-all
30+
waitFor:
31+
- init-all
32+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
2833
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create']
2934
- id: init disable-client-cert
3035
waitFor:
31-
- prepare
36+
- create-all
3237
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
3338
args: ['/bin/bash', '-c', 'cft test run TestDisableClientCert --stage init --verbose --test-dir test/integration']
3439
- id: apply disable-client-cert
@@ -48,7 +53,7 @@ steps:
4853
args: ['/bin/bash', '-c', 'cft test run TestDisableClientCert --stage teardown --verbose --test-dir test/integration']
4954
- id: init shared-vpc-local
5055
waitFor:
51-
- create all
56+
- create-all
5257
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
5358
args: ['/bin/bash', '-c', 'cft test run TestSharedVPC --stage init --verbose --test-dir test/integration']
5459
- id: apply shared-vpc-local
@@ -68,7 +73,7 @@ steps:
6873
args: ['/bin/bash', '-c', 'cft test run TestSharedVPC --stage teardown --verbose --test-dir test/integration']
6974
- id: init safer-cluster-local
7075
waitFor:
71-
- create all
76+
- create-all
7277
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
7378
args: ['/bin/bash', '-c', 'cft test run TestSaferCluster --stage init --verbose']
7479
- id: apply safer-cluster-local
@@ -88,7 +93,7 @@ steps:
8893
args: ['/bin/bash', '-c', 'cft test run TestSaferCluster --stage destroy --verbose']
8994
- id: init simple-regional-local
9095
waitFor:
91-
- create all
96+
- create-all
9297
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
9398
args: ['/bin/bash', '-c', 'cft test run TestSimpleRegional --stage init --verbose']
9499
- id: apply simple-regional-local
@@ -108,7 +113,7 @@ steps:
108113
args: ['/bin/bash', '-c', 'cft test run TestSimpleRegional --stage teardown --verbose']
109114
- id: init simple-regional-private-local
110115
waitFor:
111-
- create all
116+
- create-all
112117
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
113118
args: ['/bin/bash', '-c', 'cft test run TestSimpleRegionalPrivate --stage init --verbose']
114119
- id: apply simple-regional-private-local
@@ -128,7 +133,7 @@ steps:
128133
args: ['/bin/bash', '-c', 'cft test run TestSimpleRegionalPrivate --stage teardown --verbose']
129134
- id: init simple-regional-with-kubeconfig-local
130135
waitFor:
131-
- create all
136+
- create-all
132137
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
133138
args: ['/bin/bash', '-c', 'cft test run TestSimpleRegionalWithKubeConfig --stage init --verbose']
134139
- id: apply simple-regional-with-kubeconfig-local
@@ -148,7 +153,7 @@ steps:
148153
args: ['/bin/bash', '-c', 'cft test run TestSimpleRegionalWithKubeConfig --stage teardown --verbose']
149154
- id: converge simple-regional-with-gateway-api-local
150155
waitFor:
151-
- create all
156+
- create-all
152157
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
153158
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge simple-regional-with-gateway-api-local']
154159
- id: verify simple-regional-with-gateway-api-local
@@ -163,7 +168,7 @@ steps:
163168
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy simple-regional-with-gateway-api-local']
164169
- id: init simple-regional-with-networking-local
165170
waitFor:
166-
- create all
171+
- create-all
167172
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
168173
args: ['/bin/bash', '-c', 'cft test run TestSimpleRegionalWithNetworking --stage init --verbose']
169174
- id: apply simple-regional-with-networking-local
@@ -183,7 +188,7 @@ steps:
183188
args: ['/bin/bash', '-c', 'cft test run TestSimpleRegionalWithNetworking --stage teardown --verbose']
184189
- id: init simple-zonal-local
185190
waitFor:
186-
- create all
191+
- create-all
187192
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
188193
args: ['/bin/bash', '-c', 'cft test run TestSimpleZonal --stage init --verbose']
189194
- id: apply simple-zonal-local
@@ -203,7 +208,7 @@ steps:
203208
args: ['/bin/bash', '-c', 'cft test run TestSimpleZonal --stage teardown --verbose']
204209
- id: init simple-zonal-private-local
205210
waitFor:
206-
- create all
211+
- create-all
207212
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
208213
args: ['/bin/bash', '-c', 'cft test run TestSimpleZonalPrivate --stage init --verbose']
209214
- id: apply simple-zonal-private-local
@@ -223,7 +228,7 @@ steps:
223228
args: ['/bin/bash', '-c', 'cft test run TestSimpleZonalPrivate --stage teardown --verbose']
224229
- id: converge stub-domains-local
225230
waitFor:
226-
- create all
231+
- create-all
227232
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
228233
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge stub-domains-local']
229234
- id: verify stub-domains-local
@@ -238,7 +243,7 @@ steps:
238243
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy stub-domains-local']
239244
- id: converge upstream-nameservers-local
240245
waitFor:
241-
- create all
246+
- create-all
242247
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
243248
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge upstream-nameservers-local']
244249
- id: verify upstream-nameservers-local
@@ -253,7 +258,7 @@ steps:
253258
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy upstream-nameservers-local']
254259
- id: converge stub-domains-upstream-nameservers-local
255260
waitFor:
256-
- create all
261+
- create-all
257262
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
258263
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge stub-domains-upstream-nameservers-local']
259264
- id: verify stub-domains-upstream-nameservers-local
@@ -268,7 +273,7 @@ steps:
268273
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy stub-domains-upstream-nameservers-local']
269274
- id: converge workload-metadata-config-local
270275
waitFor:
271-
- create all
276+
- create-all
272277
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
273278
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge workload-metadata-config-local']
274279
- id: verify workload-metadata-config-local
@@ -283,7 +288,7 @@ steps:
283288
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy workload-metadata-config-local']
284289
- id: init beta-cluster
285290
waitFor:
286-
- prepare
291+
- create-all
287292
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
288293
args: ['/bin/bash', '-c', 'cft test run TestBetaCluster --stage init --verbose --test-dir test/integration']
289294
- id: apply beta-cluster
@@ -303,7 +308,7 @@ steps:
303308
args: ['/bin/bash', '-c', 'cft test run TestBetaCluster --stage teardown --verbose --test-dir test/integration']
304309
- id: init simple-windows-node-pool-local
305310
waitFor:
306-
- create all
311+
- create-all
307312
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
308313
args: ['/bin/bash', '-c', 'cft test run TestSimpleWindowsNodePool --stage init --verbose --test-dir test/integration']
309314
- id: apply simple-windows-node-pool-local
@@ -323,7 +328,7 @@ steps:
323328
args: ['/bin/bash', '-c', 'cft test run TestSimpleWindowsNodePool --stage teardown --verbose --test-dir test/integration']
324329
- id: init deploy-service-local
325330
waitFor:
326-
- create all
331+
- create-all
327332
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
328333
args: ['/bin/bash', '-c', 'cft test run TestDeployService --stage init --verbose']
329334
- id: apply deploy-service-local
@@ -343,7 +348,7 @@ steps:
343348
args: ['/bin/bash', '-c', 'cft test run TestDeployService --stage destroy --verbose']
344349
- id: converge node-pool-local
345350
waitFor:
346-
- create all
351+
- create-all
347352
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
348353
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge node-pool-local']
349354
- id: verify node-pool-local
@@ -358,7 +363,7 @@ steps:
358363
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy node-pool-local']
359364
- id: init sandbox-enabled-local
360365
waitFor:
361-
- create all
366+
- create-all
362367
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
363368
args: ['/bin/bash', '-c', 'cft test run TestSandboxEnabled --stage init --verbose']
364369
- id: apply sandbox-enabled-local
@@ -378,7 +383,7 @@ steps:
378383
args: ['/bin/bash', '-c', 'cft test run TestSandboxEnabled --stage destroy --verbose']
379384
- id: converge workload-identity-local
380385
waitFor:
381-
- create all
386+
- create-all
382387
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
383388
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge workload-identity-local']
384389
- id: verify workload-identity-local
@@ -393,7 +398,7 @@ steps:
393398
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy workload-identity-local']
394399
- id: converge safer-cluster-iap-bastion-local
395400
waitFor:
396-
- create all
401+
- create-all
397402
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
398403
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge safer-cluster-iap-bastion-local']
399404
- id: verify safer-cluster-iap-bastion-local
@@ -408,7 +413,7 @@ steps:
408413
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy safer-cluster-iap-bastion-local']
409414
- id: init simple-zonal-with-asm-local
410415
waitFor:
411-
- create all
416+
- create-all
412417
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
413418
args: ['/bin/bash', '-c', 'cft test run TestSimpleZonalWithASM --stage init --verbose']
414419
- id: apply simple-zonal-with-asm-local
@@ -428,7 +433,7 @@ steps:
428433
args: ['/bin/bash', '-c', 'cft test run TestSimpleZonalWithASM --stage teardown --verbose']
429434
- id: init simple-autopilot-private-local
430435
waitFor:
431-
- create all
436+
- create-all
432437
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
433438
args: ['/bin/bash', '-c', 'cft test run TestSimpleAutopilotPrivate --stage init --verbose']
434439
- id: apply simple-autopilot-private-local
@@ -448,7 +453,7 @@ steps:
448453
args: ['/bin/bash', '-c', 'cft test run TestSimpleAutopilotPrivate --stage teardown --verbose']
449454
- id: init simple-autopilot-public-local
450455
waitFor:
451-
- create all
456+
- create-all
452457
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
453458
args: ['/bin/bash', '-c', 'cft test run TestSimpleAutopilotPublic --stage init --verbose']
454459
- id: apply simple-autopilot-public-local
@@ -468,7 +473,7 @@ steps:
468473
args: ['/bin/bash', '-c', 'cft test run TestSimpleAutopilotPublic --stage teardown --verbose']
469474
- id: init private-zonal-with-networking
470475
waitFor:
471-
- prepare
476+
- create-all
472477
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
473478
args: ['/bin/bash', '-c', 'cft test run TestPrivateZonalWithNetworking --stage init --verbose --test-dir test/integration']
474479
- id: apply private-zonal-with-networking
@@ -488,7 +493,7 @@ steps:
488493
args: ['/bin/bash', '-c', 'cft test run TestPrivateZonalWithNetworking --stage teardown --verbose --test-dir test/integration']
489494
- id: init simple-autopilot-private-non-default-sa
490495
waitFor:
491-
- prepare
496+
- create-all
492497
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
493498
args: ['/bin/bash', '-c', 'cft test run TestSimpleAutopilotPrivateNonDefaultSA --stage init --verbose']
494499
- id: apply simple-autopilot-private-non-default-sa
@@ -511,6 +516,6 @@ tags:
511516
- 'integration'
512517
substitutions:
513518
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
514-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.10'
519+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.16'
515520
options:
516521
machineType: 'N1_HIGHCPU_8'

build/lint.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ tags:
2222
- 'lint'
2323
substitutions:
2424
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
25-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.10'
25+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.16'
2626
options:
2727
machineType: 'N1_HIGHCPU_8'
2828
env:

examples/deploy_service/test_outputs.tf

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/**
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// These outputs are used to test the module with kitchen-terraform
18+
// They do not need to be included in real-world uses of this module
19+
20+
output "project_id" {
21+
value = var.project_id
22+
}
23+
24+
output "region" {
25+
value = module.gke.region
26+
}
27+
28+
output "cluster_name" {
29+
description = "Cluster name"
30+
value = module.gke.name
31+
}
32+
33+
output "network" {
34+
value = var.network
35+
}
36+
37+
output "subnetwork" {
38+
value = var.subnetwork
39+
}
40+
41+
output "location" {
42+
value = module.gke.location
43+
}
44+
45+
output "ip_range_pods" {
46+
description = "The secondary IP range used for pods"
47+
value = var.ip_range_pods
48+
}
49+
50+
output "ip_range_services" {
51+
description = "The secondary IP range used for services"
52+
value = var.ip_range_services
53+
}
54+
55+
output "zones" {
56+
description = "List of zones in which the cluster resides"
57+
value = module.gke.zones
58+
}
59+
60+
output "master_kubernetes_version" {
61+
description = "The master Kubernetes version"
62+
value = module.gke.master_version
63+
}

examples/disable_client_cert/test_outputs.tf

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)