Skip to content

Commit 28e9123

Browse files
chore: update tests to use 1.0 image and update compat note (#101)
1 parent e56fa69 commit 28e9123

File tree

17 files changed

+121
-20
lines changed

17 files changed

+121
-20
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
@@ -50,3 +50,6 @@ tmp
5050
# Ignore cache directory
5151
cache/*
5252
!cache/README.md
53+
54+
# tf lock file
55+
.terraform.lock.hcl

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 -O extglob
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ Setting it to `never` will *never* gcloud download and setting it to `always` wi
4545
| additional\_components | Additional gcloud CLI components to install. Defaults to none. Valid value are components listed in `gcloud components list` | `list` | `[]` | no |
4646
| create\_cmd\_body | On create, the command body you'd like to run with your entrypoint. | `string` | `"info"` | no |
4747
| create\_cmd\_entrypoint | On create, the command entrypoint you'd like to use. Can also be set to a custom script. Module's bin directory will be prepended to path. | `string` | `"gcloud"` | no |
48-
| create\_cmd\_triggers | List of any additional triggers for the create command execution. | `map` | `{}` | no |
48+
| create\_cmd\_triggers | List of any additional triggers for the create command execution. | `map(any)` | `{}` | no |
4949
| destroy\_cmd\_body | On destroy, the command body you'd like to run with your entrypoint. | `string` | `"info"` | no |
5050
| destroy\_cmd\_entrypoint | On destroy, the command entrypoint you'd like to use. Can also be set to a custom script. Module's bin directory will be prepended to path. | `string` | `"gcloud"` | no |
5151
| enabled | Flag to optionally disable usage of this module. | `bool` | `true` | no |
5252
| gcloud\_download\_url | Custom gcloud download url. Optional. | `string` | `""` | no |
5353
| gcloud\_sdk\_version | The gcloud sdk version to download. | `string` | `"281.0.0"` | no |
5454
| jq\_download\_url | Custom jq download url. Optional. | `string` | `""` | no |
5555
| jq\_version | The jq version to download. | `string` | `"1.6"` | no |
56-
| module\_depends\_on | List of modules or resources this module depends on. | `list` | `[]` | no |
56+
| module\_depends\_on | List of modules or resources this module depends on. | `list(any)` | `[]` | no |
5757
| platform | Platform CLI will run on. Defaults to linux. Valid values: linux, darwin | `string` | `"linux"` | no |
5858
| service\_account\_key\_file | Path to service account key file to run `gcloud auth activate-service-account` with. Optional. | `string` | `""` | no |
5959
| skip\_download | Whether to skip downloading gcloud (assumes gcloud is already available outside the module) | `bool` | `true` | no |

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ tags:
5858
- 'integration'
5959
substitutions:
6060
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
61-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
61+
_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
@@ -23,4 +23,4 @@ tags:
2323
- 'lint'
2424
substitutions:
2525
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
26-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
26+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0'

main.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ locals {
5454
}
5555

5656
resource "random_id" "cache" {
57-
count = (! local.skip_download) ? 1 : 0
57+
count = (!local.skip_download) ? 1 : 0
5858

5959
byte_length = 4
6060
}
@@ -75,7 +75,7 @@ data "external" "env_override" {
7575
}
7676

7777
resource "null_resource" "prepare_cache" {
78-
count = (var.enabled && ! local.skip_download) ? 1 : 0
78+
count = (var.enabled && !local.skip_download) ? 1 : 0
7979

8080
triggers = merge({
8181
md5 = md5(var.create_cmd_entrypoint)
@@ -92,7 +92,7 @@ resource "null_resource" "prepare_cache" {
9292
}
9393

9494
resource "null_resource" "download_gcloud" {
95-
count = (var.enabled && ! local.skip_download) ? 1 : 0
95+
count = (var.enabled && !local.skip_download) ? 1 : 0
9696

9797
triggers = merge({
9898
md5 = md5(var.create_cmd_entrypoint)
@@ -109,7 +109,7 @@ resource "null_resource" "download_gcloud" {
109109
}
110110

111111
resource "null_resource" "download_jq" {
112-
count = (var.enabled && ! local.skip_download) ? 1 : 0
112+
count = (var.enabled && !local.skip_download) ? 1 : 0
113113

114114
triggers = merge({
115115
md5 = md5(var.create_cmd_entrypoint)
@@ -126,7 +126,7 @@ resource "null_resource" "download_jq" {
126126
}
127127

128128
resource "null_resource" "decompress" {
129-
count = (var.enabled && ! local.skip_download) ? 1 : 0
129+
count = (var.enabled && !local.skip_download) ? 1 : 0
130130

131131
triggers = merge({
132132
md5 = md5(var.create_cmd_entrypoint)
@@ -145,7 +145,7 @@ resource "null_resource" "decompress" {
145145
}
146146

147147
resource "null_resource" "upgrade" {
148-
count = (var.enabled && var.upgrade && ! local.skip_download) ? 1 : 0
148+
count = (var.enabled && var.upgrade && !local.skip_download) ? 1 : 0
149149

150150
depends_on = [null_resource.decompress]
151151

@@ -308,7 +308,7 @@ resource "null_resource" "additional_components_destroy" {
308308
}
309309

310310
resource "null_resource" "upgrade_destroy" {
311-
count = (var.enabled && var.upgrade && ! local.skip_download) ? 1 : 0
311+
count = (var.enabled && var.upgrade && !local.skip_download) ? 1 : 0
312312

313313
depends_on = [
314314
null_resource.additional_components_destroy,
@@ -327,7 +327,7 @@ resource "null_resource" "upgrade_destroy" {
327327
}
328328

329329
resource "null_resource" "decompress_destroy" {
330-
count = (var.enabled && ! local.skip_download) ? 1 : 0
330+
count = (var.enabled && !local.skip_download) ? 1 : 0
331331
depends_on = [null_resource.upgrade_destroy]
332332

333333
triggers = {

modules/kubectl-wrapper/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ module "kubectl" {
2828
| additional\_components | Additional gcloud CLI components to install. Defaults to installing kubectl. Valid value are components listed in `gcloud components list` | `list` | <pre>[<br> "kubectl"<br>]</pre> | no |
2929
| cluster\_location | Cluster location (Zone/Region). Optional if use\_existing\_context is true. | `string` | `""` | no |
3030
| cluster\_name | Cluster name. Optional if use\_existing\_context is true. | `string` | `""` | no |
31-
| create\_cmd\_triggers | List of any additional triggers for the create command execution. | `map` | `{}` | no |
31+
| create\_cmd\_triggers | List of any additional triggers for the create command execution. | `map(any)` | `{}` | no |
3232
| enabled | Flag to optionally disable usage of this module. | `bool` | `true` | no |
3333
| gcloud\_sdk\_version | The gcloud sdk version to download. | `string` | `"281.0.0"` | no |
3434
| impersonate\_service\_account | An optional service account to impersonate for gcloud commands. If this service account is not specified, the module will use Application Default Credentials. | `string` | `""` | no |
3535
| internal\_ip | Use internal ip for the cluster endpoint. | `bool` | `false` | no |
3636
| kubectl\_create\_command | The kubectl command to create resources. | `string` | n/a | yes |
3737
| kubectl\_destroy\_command | The kubectl command to destroy resources. | `string` | n/a | yes |
38-
| module\_depends\_on | List of modules or resources this module depends on. | `list` | `[]` | no |
38+
| module\_depends\_on | List of modules or resources this module depends on. | `list(any)` | `[]` | no |
3939
| project\_id | The project ID hosting the cluster. Optional if use\_existing\_context is true. | `string` | `""` | no |
4040
| service\_account\_key\_file | Path to service account key file to auth as for running `gcloud container clusters get-credentials`. | `string` | `""` | no |
4141
| skip\_download | Whether to skip downloading gcloud (assumes gcloud and kubectl is already available outside the module) | `bool` | `true` | no |

modules/kubectl-wrapper/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ variable "enabled" {
5050

5151
variable "module_depends_on" {
5252
description = "List of modules or resources this module depends on."
53-
type = list
53+
type = list(any)
5454
default = []
5555
}
5656

5757
variable "create_cmd_triggers" {
5858
description = "List of any additional triggers for the create command execution."
59-
type = map
59+
type = map(any)
6060
default = {}
6161
}
6262

0 commit comments

Comments
 (0)