Skip to content

Commit bb36cbf

Browse files
authored
chore: update tests to use 1.0 image and update compat note (terraform-google-modules#965)
* feat: update tests and readme for 1.0 * autogen fmt * ignore lockfile * build * swap cloudbuild images * test serial create * sensitive vals in root mod fixtures * mark wrapped op as sensitive * fix_headers * Update README.md * regen docs
1 parent 5d25e15 commit bb36cbf

File tree

71 files changed

+537
-269
lines changed

Some content is hidden

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

71 files changed

+537
-269
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:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ Session.vim
3131
*.tfstate
3232
*.tfstate.*
3333

34+
# tf lock file
35+
.terraform.lock.hcl
36+
3437
# Crash log files
3538
crash.log
3639

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: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ Sub modules are provided for creating private clusters, beta private clusters, a
1212

1313
## Compatibility
1414

15-
This module is meant for use with Terraform 0.12. If you haven't
16-
[upgraded][terraform-0.12-upgrade] and need a Terraform
17-
0.11.x-compatible version of this module, the last released version
18-
intended for Terraform 0.11.x is [3.0.0].
15+
This module is meant for use with Terraform 0.13+ and tested using Terraform 1.0+.
16+
If you find incompatibilities using Terraform `>=0.13`, please open an issue.
17+
18+
If you haven't [upgraded][terraform-0.13-upgrade] and need a Terraform
19+
0.12.x-compatible version of this module, the last released version
20+
intended for Terraform 0.12.x is [12.3.0].
1921

2022
## Usage
2123
There are multiple examples included in the [examples](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/tree/master/examples) folder but simple usage is as follows:
@@ -293,5 +295,5 @@ In order to operate with the Service Account you must activate the following API
293295
- Kubernetes Engine API - container.googleapis.com
294296

295297
[terraform-provider-google]: https://github.com/terraform-providers/terraform-provider-google
296-
[3.0.0]: https://registry.terraform.io/modules/terraform-google-modules/kubernetes-engine/google/3.0.0
297-
[terraform-0.12-upgrade]: https://www.terraform.io/upgrade-guides/0-12.html
298+
[12.3.0]: https://registry.terraform.io/modules/terraform-google-modules/kubernetes-engine/google/12.3.0
299+
[terraform-0.13-upgrade]: https://www.terraform.io/upgrade-guides/0-13.html

autogen/main/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ The implications of this are that:
4242
{% endif %}
4343
## Compatibility
4444

45-
This module is meant for use with Terraform 0.12. If you haven't
46-
[upgraded][terraform-0.12-upgrade] and need a Terraform
47-
0.11.x-compatible version of this module, the last released version
48-
intended for Terraform 0.11.x is [3.0.0].
45+
This module is meant for use with Terraform 0.13+ and tested using Terraform 1.0+.
46+
If you find incompatibilities using Terraform `>=0.13`, please open an issue.
47+
48+
If you haven't [upgraded][terraform-0.13-upgrade] and need a Terraform
49+
0.12.x-compatible version of this module, the last released version
50+
intended for Terraform 0.12.x is [12.3.0].
4951

5052
## Usage
5153
There are multiple examples included in the [examples](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/tree/master/examples) folder but simple usage is as follows:
@@ -260,5 +262,5 @@ In order to operate with the Service Account you must activate the following API
260262
{% else %}
261263
[terraform-provider-google]: https://github.com/terraform-providers/terraform-provider-google
262264
{% endif %}
263-
[3.0.0]: https://registry.terraform.io/modules/terraform-google-modules/kubernetes-engine/google/3.0.0
264-
[terraform-0.12-upgrade]: https://www.terraform.io/upgrade-guides/0-12.html
265+
[12.3.0]: https://registry.terraform.io/modules/terraform-google-modules/kubernetes-engine/google/12.3.0
266+
[terraform-0.13-upgrade]: https://www.terraform.io/upgrade-guides/0-13.html

autogen/main/cluster.tf.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ resource "google_container_cluster" "primary" {
145145

146146
addons_config {
147147
http_load_balancing {
148-
disabled = ! var.http_load_balancing
148+
disabled = !var.http_load_balancing
149149
}
150150

151151
horizontal_pod_autoscaling {
152-
disabled = ! var.horizontal_pod_autoscaling
152+
disabled = !var.horizontal_pod_autoscaling
153153
}
154154

155155
network_policy_config {
156-
disabled = ! var.network_policy
156+
disabled = !var.network_policy
157157
}
158158
{% if beta_cluster %}
159159

autogen/main/dns.tf.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
module "gcloud_delete_default_kube_dns_configmap" {
2323
source = "terraform-google-modules/gcloud/google//modules/kubectl-wrapper"
2424
version = "~> 2.1.0"
25-
enabled = (local.custom_kube_dns_config || local.upstream_nameservers_config) && ! var.skip_provisioners
25+
enabled = (local.custom_kube_dns_config || local.upstream_nameservers_config) && !var.skip_provisioners
2626
cluster_name = google_container_cluster.primary.name
2727
cluster_location = google_container_cluster.primary.location
2828
project_id = var.project_id
@@ -42,7 +42,7 @@ module "gcloud_delete_default_kube_dns_configmap" {
4242
Create kube-dns confimap
4343
*****************************************/
4444
resource "kubernetes_config_map" "kube-dns" {
45-
count = local.custom_kube_dns_config && ! local.upstream_nameservers_config ? 1 : 0
45+
count = local.custom_kube_dns_config && !local.upstream_nameservers_config ? 1 : 0
4646

4747
metadata {
4848
name = "kube-dns"
@@ -67,7 +67,7 @@ EOF
6767
}
6868

6969
resource "kubernetes_config_map" "kube-dns-upstream-namservers" {
70-
count = ! local.custom_kube_dns_config && local.upstream_nameservers_config ? 1 : 0
70+
count = !local.custom_kube_dns_config && local.upstream_nameservers_config ? 1 : 0
7171

7272
metadata {
7373
name = "kube-dns"

autogen/main/main.tf.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ locals {
173173
cluster_monitoring_service = local.cluster_output_monitoring_service
174174
cluster_node_pools_names = local.cluster_output_node_pools_names
175175
cluster_node_pools_versions = local.cluster_output_node_pools_versions
176-
cluster_network_policy_enabled = ! local.cluster_output_network_policy_enabled
177-
cluster_http_load_balancing_enabled = ! local.cluster_output_http_load_balancing_enabled
178-
cluster_horizontal_pod_autoscaling_enabled = ! local.cluster_output_horizontal_pod_autoscaling_enabled
179-
workload_identity_enabled = ! (var.identity_namespace == null || var.identity_namespace == "null")
176+
cluster_network_policy_enabled = !local.cluster_output_network_policy_enabled
177+
cluster_http_load_balancing_enabled = !local.cluster_output_http_load_balancing_enabled
178+
cluster_horizontal_pod_autoscaling_enabled = !local.cluster_output_horizontal_pod_autoscaling_enabled
179+
workload_identity_enabled = !(var.identity_namespace == null || var.identity_namespace == "null")
180180
cluster_workload_identity_config = ! local.workload_identity_enabled ? [] : var.identity_namespace == "enabled" ? [{
181181
identity_namespace = "${var.project_id}.svc.id.goog" }] : [{ identity_namespace = var.identity_namespace
182182
}]

0 commit comments

Comments
 (0)