Skip to content

Commit 2d57bef

Browse files
fix(deps): lint updates for cft/developer-tools v1.18 (#123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Andrew Peabody <[email protected]>
1 parent 90fdc5d commit 2d57bef

File tree

25 files changed

+48
-43
lines changed

25 files changed

+48
-43
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.0
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.18
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ tags:
4141
- 'integration'
4242
substitutions:
4343
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
44-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.0'
44+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.18'

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: '1.0'
24+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '1.18'

examples/instance_with_advanced_options/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ output "instance_name" {
3636

3737
output "ipv4" {
3838
description = "The public IP address of the deployed instance"
39-
value = google_compute_instance.vm.network_interface.0.access_config.0.nat_ip
39+
value = google_compute_instance.vm.network_interface[0].access_config[0].nat_ip
4040
}

examples/instance_with_attached_disk/main.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
provider "google" {
18-
}
19-
2017
locals {
2118
instance_name = format("%s-%s", var.instance_name, substr(md5(module.gce-container.container.image), 0, 8))
2219
}

examples/instance_with_attached_disk/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ output "volumes" {
3131

3232
output "http_address" {
3333
description = "The IP address on which the HTTP service is exposed"
34-
value = google_compute_instance.vm.network_interface.0.access_config.0.nat_ip
34+
value = google_compute_instance.vm.network_interface[0].access_config[0].nat_ip
3535
}
3636

3737
output "http_port" {
@@ -46,5 +46,5 @@ output "instance_name" {
4646

4747
output "ipv4" {
4848
description = "The public IP address of the deployed instance"
49-
value = google_compute_instance.vm.network_interface.0.access_config.0.nat_ip
49+
value = google_compute_instance.vm.network_interface[0].access_config[0].nat_ip
5050
}

examples/instance_with_config_file/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ output "volumes" {
3636

3737
output "ipv4" {
3838
description = "The public IP address of the deployed instance"
39-
value = google_compute_instance.vm.network_interface.0.access_config.0.nat_ip
39+
value = google_compute_instance.vm.network_interface[0].access_config[0].nat_ip
4040
}

examples/managed_instance_group/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ This example requires that some python libraries be installed, as outlined in `r
2121
| region | The GCP region to deploy instances into | `string` | n/a | yes |
2222
| service\_account | n/a | <pre>object({<br> email = string,<br> scopes = list(string)<br> })</pre> | <pre>{<br> "email": "",<br> "scopes": [<br> "cloud-platform"<br> ]<br>}</pre> | no |
2323
| subnetwork | The name of the subnetwork to deploy instances into | `string` | `"mig-subnet"` | no |
24-
| zone | The GCP zone to deploy instances into | `string` | n/a | yes |
2524

2625
## Outputs
2726

examples/managed_instance_group/variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ variable "region" {
5454
type = string
5555
}
5656

57-
variable "zone" {
58-
description = "The GCP zone to deploy instances into"
59-
type = string
60-
}
61-
6257
variable "network" {
6358
description = "The GCP network"
6459
type = string

examples/simple_instance/main.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
provider "google" {
18-
}
19-
2017
locals {
2118
instance_name = format("%s-%s", var.instance_name, substr(md5(module.gce-container.container.image), 0, 8))
2219
}

examples/simple_instance/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ output "instance_name" {
3636

3737
output "ipv4" {
3838
description = "The public IP address of the deployed instance"
39-
value = google_compute_instance.vm.network_interface.0.access_config.0.nat_ip
39+
value = google_compute_instance.vm.network_interface[0].access_config[0].nat_ip
4040
}
4141

4242
output "cos_image_name" {

modules/cos-coredns/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ data "template_file" "cloud-config" {
4242
image = var.container_image
4343
instance_id = count.index + 1
4444
log_driver = var.log_driver
45-
ip_address = google_compute_address.addresses.*.address[count.index]
45+
ip_address = google_compute_address.addresses[*].address[count.index]
4646
}
4747
}
4848

@@ -72,7 +72,7 @@ resource "google_compute_instance" "default" {
7272

7373
network_interface {
7474
subnetwork = var.subnetwork
75-
network_ip = google_compute_address.addresses.*.address[count.index]
75+
network_ip = google_compute_address.addresses[*].address[count.index]
7676
access_config {}
7777
}
7878

@@ -84,7 +84,7 @@ resource "google_compute_instance" "default" {
8484
metadata = {
8585
google-logging-enabled = var.stackdriver_logging
8686
google-monitoring-enabled = var.stackdriver_monitoring
87-
user-data = data.template_file.cloud-config.*.rendered[count.index]
87+
user-data = data.template_file.cloud-config[*].rendered[count.index]
8888
}
8989
}
9090

modules/cos-coredns/outputs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
output "instances" {
1818
description = "Instance name => address map."
19-
value = zipmap(google_compute_instance.default.*.name, google_compute_address.addresses.*.address)
19+
value = zipmap(google_compute_instance.default[*].name, google_compute_address.addresses[*].address)
2020
}
2121

2222
output "names" {
2323
description = "List of instance names."
24-
value = [google_compute_instance.default.*.name]
24+
value = [google_compute_instance.default[*].name]
2525
}
2626

2727
output "internal_addresses" {
2828
description = "List of instance internal addresses."
29-
value = [google_compute_instance.default.*.network_interface.0.network_ip]
29+
value = [google_compute_instance.default[*].network_interface[0].network_ip]
3030
}

modules/cos-coredns/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ variable "corefile" {
121121

122122
variable "log_driver" {
123123
description = "Docker log driver to use for CoreDNS."
124+
type = string
124125
default = "gcplogs"
125126
}
126127

@@ -132,6 +133,7 @@ variable "stackdriver_logging" {
132133

133134
variable "stackdriver_monitoring" {
134135
description = "Enable the Stackdriver monitoring agent."
136+
type = bool
135137
default = true
136138
}
137139

modules/cos-coredns/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ terraform {
2626
source = "hashicorp/google-beta"
2727
version = ">= 3.53, < 5.0"
2828
}
29+
template = {
30+
source = "hashicorp/template"
31+
version = ">= 2.1.0"
32+
}
2933
}
3034

3135
provider_meta "google" {

modules/cos-generic/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ data "template_file" "cloud-config" {
3939
custom_var = var.cloud_init_custom_var
4040
instance_id = count.index + 1
4141
instance_name = "${local.prefix}${count.index + 1}"
42-
ip_address = var.reserve_ip ? google_compute_address.addresses.*.address[count.index] : ""
42+
ip_address = var.reserve_ip ? google_compute_address.addresses[*].address[count.index] : ""
4343
}
4444
}
4545

@@ -69,7 +69,7 @@ resource "google_compute_instance" "default" {
6969

7070
network_interface {
7171
subnetwork = var.subnetwork
72-
network_ip = var.reserve_ip ? google_compute_address.addresses.*.address[count.index] : ""
72+
network_ip = var.reserve_ip ? google_compute_address.addresses[*].address[count.index] : ""
7373
access_config {}
7474
}
7575

@@ -81,7 +81,7 @@ resource "google_compute_instance" "default" {
8181
metadata = {
8282
google-logging-enabled = var.stackdriver_logging
8383
google-monitoring-enabled = var.stackdriver_monitoring
84-
user-data = data.template_file.cloud-config.*.rendered[count.index]
84+
user-data = data.template_file.cloud-config[*].rendered[count.index]
8585
}
8686

8787
allow_stopping_for_update = var.allow_stopping_for_update

modules/cos-generic/outputs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
output "instances" {
1818
description = "Instance name => address map."
19-
value = zipmap(google_compute_instance.default.*.name, google_compute_address.addresses.*.address)
19+
value = zipmap(google_compute_instance.default[*].name, google_compute_address.addresses[*].address)
2020
}
2121

2222
output "names" {
2323
description = "List of instance names."
24-
value = [google_compute_instance.default.*.name]
24+
value = [google_compute_instance.default[*].name]
2525
}
2626

2727
output "internal_addresses" {
2828
description = "List of instance internal addresses."
29-
value = [google_compute_instance.default.*.network_interface.0.network_ip]
29+
value = [google_compute_instance.default[*].network_interface[0].network_ip]
3030
}

modules/cos-generic/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ terraform {
2626
source = "hashicorp/google-beta"
2727
version = ">= 3.53, < 5.0"
2828
}
29+
template = {
30+
source = "hashicorp/template"
31+
version = ">= 2.1.0"
32+
}
2933
}
3034

3135
provider_meta "google" {

modules/cos-mysql/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ data "template_file" "cloud-config" {
4646
vars = {
4747
image = var.container_image
4848
instance_id = count.index + 1
49-
ip_address = google_compute_address.addresses.*.address[count.index]
49+
ip_address = google_compute_address.addresses[*].address[count.index]
5050
key = lookup(var.kms_data, "key", "")
5151
keyring = lookup(var.kms_data, "keyring", "")
5252
location = lookup(var.kms_data, "location", "")
@@ -97,12 +97,12 @@ resource "google_compute_instance" "default" {
9797

9898
network_interface {
9999
subnetwork = var.subnetwork
100-
network_ip = google_compute_address.addresses.*.address[count.index]
100+
network_ip = google_compute_address.addresses[*].address[count.index]
101101
access_config {}
102102
}
103103

104104
attached_disk {
105-
source = google_compute_disk.disk-data.*.name[count.index]
105+
source = google_compute_disk.disk-data[*].name[count.index]
106106
device_name = "mysql-data"
107107
}
108108

@@ -116,7 +116,7 @@ resource "google_compute_instance" "default" {
116116
}
117117

118118
metadata = {
119-
user-data = data.template_file.cloud-config.*.rendered[count.index]
119+
user-data = data.template_file.cloud-config[*].rendered[count.index]
120120
google-logging-enabled = var.stackdriver_logging
121121
google-monitoring-enabled = var.stackdriver_monitoring
122122
}

modules/cos-mysql/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
output "instances" {
1818
description = "Instance name => address map."
19-
value = zipmap(google_compute_instance.default.*.name, google_compute_address.addresses.*.address)
19+
value = zipmap(google_compute_instance.default[*].name, google_compute_address.addresses[*].address)
2020
}
2121

2222
output "password" {

modules/cos-mysql/versions.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ terraform {
2626
source = "hashicorp/google-beta"
2727
version = ">= 3.53, < 5.0"
2828
}
29+
template = {
30+
source = "hashicorp/template"
31+
version = ">= 2.1.0"
32+
}
33+
random = {
34+
source = "hashicorp/random"
35+
version = ">= 3.3.0"
36+
}
2937
}
3038

3139
provider_meta "google" {

test/fixtures/instance_with_config_file/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ resource "random_string" "suffix" {
1818
length = 4
1919
upper = "false"
2020
lower = "true"
21-
number = "false"
21+
numeric = "false"
2222
special = "false"
2323
}
2424

test/fixtures/instance_with_config_file/versions.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ terraform {
2121
}
2222
local = {
2323
source = "hashicorp/local"
24-
version = "~> 2.0"
24+
version = ">= 2.0"
2525
}
2626
random = {
2727
source = "hashicorp/random"
28-
version = "~> 3.0"
28+
version = ">= 3.3.0"
2929
}
3030
tls = {
3131
source = "hashicorp/tls"
32-
version = "~> 4.0"
32+
version = ">= 4.0"
3333
}
3434
}
3535
required_version = ">= 0.13"

test/fixtures/managed_instance_group/example.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ module "example" {
2828
source = "../../../examples/managed_instance_group"
2929
project_id = var.project_id
3030
region = var.region
31-
zone = var.zone
3231
subnetwork = google_compute_subnetwork.main.name
3332
mig_name = "cft-test-${local.example_name}-${random_string.suffix.result}"
3433
image_port = "8080"

test/fixtures/shared/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ resource "random_string" "suffix" {
1818
length = 4
1919
upper = "false"
2020
lower = "true"
21-
number = "false"
21+
numeric = "false"
2222
special = "false"
2323
}
2424

0 commit comments

Comments
 (0)