Skip to content

Commit 7d20b84

Browse files
author
Arthur de Lapertosa Lisboa
committed
Merge branch 'master' into confidential-nodes-example
2 parents dceb039 + f0e0b41 commit 7d20b84

File tree

17 files changed

+1004
-739
lines changed

17 files changed

+1004
-739
lines changed

.kitchen.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,3 @@ suites:
8585
systems:
8686
- name: workload_metadata_config
8787
backend: local
88-
- name: "node_pool"
89-
transport:
90-
root_module_directory: test/fixtures/node_pool
91-
verifier:
92-
systems:
93-
- name: node_pool
94-
backend: local
95-
controls:
96-
- gcloud
97-
- kubectl

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: This file is automatically generated from values at:
22
# https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/blob/master/infra/terraform/test-org/org/locals.tf
33

4-
* @terraform-google-modules/cft-admins @ericyz @gtsorbo
4+
* @terraform-google-modules/cft-admins @apeabody @ericyz @gtsorbo
55

66
# NOTE: GitHub CODEOWNERS locations:
77
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-and-branch-protection

build/int.cloudbuild.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,21 +305,21 @@ steps:
305305
- verify deploy-service-local
306306
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
307307
args: ['/bin/bash', '-c', 'cft test run TestDeployService --stage destroy --verbose']
308-
- id: converge node-pool-local
308+
- id: apply node-pool-local
309309
waitFor:
310310
- create-all
311311
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
312-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge node-pool-local']
312+
args: ['/bin/bash', '-c', 'cft test run TestNodePool --stage apply --verbose']
313313
- id: verify node-pool-local
314314
waitFor:
315-
- converge node-pool-local
315+
- apply node-pool-local
316316
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
317-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify node-pool-local']
317+
args: ['/bin/bash', '-c', 'cft test run TestNodePool --stage verify --verbose']
318318
- id: destroy node-pool-local
319319
waitFor:
320320
- verify node-pool-local
321321
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
322-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy node-pool-local']
322+
args: ['/bin/bash', '-c', 'cft test run TestNodePool --stage destroy --verbose']
323323
- id: apply sandbox-enabled-local
324324
waitFor:
325325
- create-all

examples/node_pool/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ module "gke" {
4343
disable_legacy_metadata_endpoints = false
4444
cluster_autoscaling = var.cluster_autoscaling
4545
deletion_protection = false
46+
service_account = "default"
4647

4748
node_pools = [
4849
{

test/fixtures/node_pool/example.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17+
locals {
18+
compute_engine_service_account = var.compute_engine_service_accounts[0]
19+
}
20+
1721
module "example" {
1822
source = "../../../examples/node_pool"
1923

@@ -25,7 +29,7 @@ module "example" {
2529
subnetwork = google_compute_subnetwork.main.name
2630
ip_range_pods = google_compute_subnetwork.main.secondary_ip_range[0].range_name
2731
ip_range_services = google_compute_subnetwork.main.secondary_ip_range[1].range_name
28-
compute_engine_service_account = var.compute_engine_service_accounts[0]
32+
compute_engine_service_account = local.compute_engine_service_account
2933

3034
cluster_autoscaling = {
3135
enabled = true

test/fixtures/node_pool/outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,11 @@ output "service_account" {
8383
output "registry_project_ids" {
8484
value = var.registry_project_ids
8585
}
86+
87+
output "random_string" {
88+
value = random_string.suffix.result
89+
}
90+
91+
output "compute_engine_service_account" {
92+
value = local.compute_engine_service_account
93+
}

test/integration/go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ require (
99
github.com/gruntwork-io/terratest v0.48.1
1010
github.com/hashicorp/terraform-json v0.24.0
1111
github.com/stretchr/testify v1.10.0
12+
github.com/tidwall/gjson v1.18.0
13+
golang.org/x/sync v0.10.0
1214
)
1315

1416
require (
@@ -103,7 +105,6 @@ require (
103105
github.com/pquerna/otp v1.4.0 // indirect
104106
github.com/russross/blackfriday/v2 v2.1.0 // indirect
105107
github.com/spf13/pflag v1.0.5 // indirect
106-
github.com/tidwall/gjson v1.18.0 // indirect
107108
github.com/tidwall/match v1.1.1 // indirect
108109
github.com/tidwall/pretty v1.2.1 // indirect
109110
github.com/tidwall/sjson v1.2.5 // indirect
@@ -112,14 +113,13 @@ require (
112113
github.com/urfave/cli/v2 v2.25.7 // indirect
113114
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
114115
github.com/zclconf/go-cty v1.15.1 // indirect
115-
golang.org/x/crypto v0.29.0 // indirect
116+
golang.org/x/crypto v0.31.0 // indirect
116117
golang.org/x/mod v0.22.0 // indirect
117118
golang.org/x/net v0.31.0 // indirect
118119
golang.org/x/oauth2 v0.24.0 // indirect
119-
golang.org/x/sync v0.10.0 // indirect
120-
golang.org/x/sys v0.27.0 // indirect
121-
golang.org/x/term v0.26.0 // indirect
122-
golang.org/x/text v0.20.0 // indirect
120+
golang.org/x/sys v0.28.0 // indirect
121+
golang.org/x/term v0.27.0 // indirect
122+
golang.org/x/text v0.21.0 // indirect
123123
golang.org/x/time v0.8.0 // indirect
124124
golang.org/x/tools v0.22.0 // indirect
125125
google.golang.org/protobuf v1.35.1 // indirect

test/integration/go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmB
262262
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
263263
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
264264
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
265-
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
266-
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
265+
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
266+
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
267267
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
268268
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
269269
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
@@ -285,14 +285,14 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
285285
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
286286
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
287287
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
288-
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
289-
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
290-
golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU=
291-
golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E=
288+
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
289+
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
290+
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
291+
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
292292
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
293293
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
294-
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
295-
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
294+
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
295+
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
296296
golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg=
297297
golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
298298
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

0 commit comments

Comments
 (0)