Skip to content

Commit 90bb4b6

Browse files
authored
Merge pull request #135 from terraform-google-modules/aaron-lane-format-autogen
Fix format of autogenerated files
2 parents c316c78 + 9ea334b commit 90bb4b6

File tree

7 files changed

+26
-24
lines changed

7 files changed

+26
-24
lines changed

autogen/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,6 @@ data "google_container_engine_versions" "zone" {
162162
// data.google_container_engine_versions.zone: Cannot determine zone: set in this resource, or set provider-level zone.
163163
//
164164
zone = "${var.zones[0] == "" ? data.google_compute_zones.available.names[0] : var.zones[0]}"
165+
165166
project = "${var.project_id}"
166167
}

autogen/variables.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ variable "disable_legacy_metadata_endpoints" {
129129
default = "true"
130130
}
131131

132-
133132
variable "node_pools" {
134133
type = "list"
135134
description = "List of maps containing node pools"
@@ -218,18 +217,19 @@ variable "service_account" {
218217
default = ""
219218
}
220219
{% if private_cluster %}
220+
221221
variable "enable_private_endpoint" {
222-
description = "(Beta) Whether the master's internal IP address is used as the cluster endpoint"
223-
default = false
222+
description = "(Beta) Whether the master's internal IP address is used as the cluster endpoint"
223+
default = false
224224
}
225225

226226
variable "enable_private_nodes" {
227-
description = "(Beta) Whether nodes have internal IP addresses only"
228-
default = false
227+
description = "(Beta) Whether nodes have internal IP addresses only"
228+
default = false
229229
}
230230

231231
variable "master_ipv4_cidr_block" {
232-
description = "(Beta) The IP range in CIDR notation to use for the hosted master network"
233-
default = "10.0.0.0/28"
232+
description = "(Beta) The IP range in CIDR notation to use for the hosted master network"
233+
default = "10.0.0.0/28"
234234
}
235235
{% endif %}

helpers/generate_modules/generate_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def main(argv):
6666
module.template_options(BASE_TEMPLATE_OPTIONS)
6767
)
6868
with open(os.path.join(module.path, template_file), "w") as f:
69-
f.write(rendered.rstrip())
69+
f.write(rendered)
7070
if template_file.endswith(".tf"):
7171
subprocess.call(
7272
[

main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ data "google_container_engine_versions" "zone" {
161161
//
162162
// data.google_container_engine_versions.zone: Cannot determine zone: set in this resource, or set provider-level zone.
163163
//
164-
zone = "${var.zones[0] == "" ? data.google_compute_zones.available.names[0] : var.zones[0]}"
165-
project = "${var.project_id}"
166-
}
164+
zone = "${var.zones[0] == "" ? data.google_compute_zones.available.names[0] : var.zones[0]}"
165+
166+
project = "${var.project_id}"
167+
}

modules/private-cluster/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ data "google_container_engine_versions" "zone" {
161161
//
162162
// data.google_container_engine_versions.zone: Cannot determine zone: set in this resource, or set provider-level zone.
163163
//
164-
zone = "${var.zones[0] == "" ? data.google_compute_zones.available.names[0] : var.zones[0]}"
165-
project = "${var.project_id}"
166-
}
164+
zone = "${var.zones[0] == "" ? data.google_compute_zones.available.names[0] : var.zones[0]}"
165+
166+
project = "${var.project_id}"
167+
}

modules/private-cluster/variables.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ variable "disable_legacy_metadata_endpoints" {
129129
default = "true"
130130
}
131131

132-
133132
variable "node_pools" {
134133
type = "list"
135134
description = "List of maps containing node pools"
@@ -217,17 +216,18 @@ variable "service_account" {
217216
description = "The service account to default running nodes as if not overridden in `node_pools`. Defaults to the compute engine default service account. May also specify `create` to automatically create a cluster-specific service account"
218217
default = ""
219218
}
219+
220220
variable "enable_private_endpoint" {
221-
description = "(Beta) Whether the master's internal IP address is used as the cluster endpoint"
222-
default = false
221+
description = "(Beta) Whether the master's internal IP address is used as the cluster endpoint"
222+
default = false
223223
}
224224

225225
variable "enable_private_nodes" {
226-
description = "(Beta) Whether nodes have internal IP addresses only"
227-
default = false
226+
description = "(Beta) Whether nodes have internal IP addresses only"
227+
default = false
228228
}
229229

230230
variable "master_ipv4_cidr_block" {
231-
description = "(Beta) The IP range in CIDR notation to use for the hosted master network"
232-
default = "10.0.0.0/28"
233-
}
231+
description = "(Beta) The IP range in CIDR notation to use for the hosted master network"
232+
default = "10.0.0.0/28"
233+
}

variables.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ variable "disable_legacy_metadata_endpoints" {
129129
default = "true"
130130
}
131131

132-
133132
variable "node_pools" {
134133
type = "list"
135134
description = "List of maps containing node pools"
@@ -216,4 +215,4 @@ variable "monitoring_service" {
216215
variable "service_account" {
217216
description = "The service account to default running nodes as if not overridden in `node_pools`. Defaults to the compute engine default service account. May also specify `create` to automatically create a cluster-specific service account"
218217
default = ""
219-
}
218+
}

0 commit comments

Comments
 (0)