Skip to content

Commit

Permalink
fixed lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
g-awmalik committed Sep 20, 2023
1 parent ee04130 commit f141bd4
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 24 deletions.
2 changes: 1 addition & 1 deletion modules/compute_disk_snapshot/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ output "policy" {

output "attachments" {
description = "Disk attachments to the resource policy"
value = google_compute_disk_resource_policy_attachment.attachment.*
value = google_compute_disk_resource_policy_attachment.attachment[*]
}
10 changes: 8 additions & 2 deletions modules/compute_disk_snapshot/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 3.71, < 5.0"
null = ">= 2.1"
google = {
source = "hashicorp/google"
version = ">= 3.71, < 5.0"
}
null = {
source = "hashicorp/null"
version = ">= 2.1"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:compute_instance/v9.0.0"
Expand Down
6 changes: 3 additions & 3 deletions modules/compute_instance/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

output "instances_self_links" {
description = "List of self-links for compute instances"
value = google_compute_instance_from_template.compute_instance.*.self_link
value = google_compute_instance_from_template.compute_instance[*].self_link
}

output "instances_details" {
description = "List of all details for compute instances"
sensitive = true
value = google_compute_instance_from_template.compute_instance.*
sensitive = true
value = google_compute_instance_from_template.compute_instance[*]
}

output "available_zones" {
Expand Down
5 changes: 4 additions & 1 deletion modules/compute_instance/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 3.88, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 3.88, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:compute_instance/v9.0.0"
Expand Down
5 changes: 4 additions & 1 deletion modules/instance_template/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 4.67, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 4.67, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:instance_template/v9.0.0"
Expand Down
6 changes: 3 additions & 3 deletions modules/mig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

locals {
healthchecks = concat(
google_compute_health_check.https.*.self_link,
google_compute_health_check.http.*.self_link,
google_compute_health_check.tcp.*.self_link,
google_compute_health_check.https[*].self_link,
google_compute_health_check.http[*].self_link,
google_compute_health_check.tcp[*].self_link,
)
distribution_policy_zones = coalescelist(var.distribution_policy_zones, data.google_compute_zones.available.names)
autoscaling_scale_in_enabled = var.autoscaling_scale_in_control.fixed_replicas != null || var.autoscaling_scale_in_control.percent_replicas != null
Expand Down
11 changes: 9 additions & 2 deletions modules/mig/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 4.48, < 5.0"
google-beta = ">= 4.48, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 4.48, < 5.0"
}

google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.48, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:mig/v9.0.0"
Expand Down
6 changes: 3 additions & 3 deletions modules/mig_with_percent/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

locals {
healthchecks = concat(
google_compute_health_check.https.*.self_link,
google_compute_health_check.http.*.self_link,
google_compute_health_check.tcp.*.self_link,
google_compute_health_check.https[*].self_link,
google_compute_health_check.http[*].self_link,
google_compute_health_check.tcp[*].self_link,
)
distribution_policy_zones = coalescelist(var.distribution_policy_zones, data.google_compute_zones.available.names)
autoscaling_scale_in_enabled = var.autoscaling_scale_in_control.fixed_replicas != null || var.autoscaling_scale_in_control.percent_replicas != null
Expand Down
11 changes: 9 additions & 2 deletions modules/mig_with_percent/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 4.48, < 5.0"
google-beta = ">= 4.48, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 4.48, < 5.0"
}

google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.48, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:mig_with_percent/v9.0.0"
Expand Down
4 changes: 2 additions & 2 deletions modules/umig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ resource "google_compute_instance_group" "instance_group" {
project = var.project_id
zone = element(local.zones, count.index)
instances = matchkeys(
google_compute_instance_from_template.compute_instance.*.self_link,
google_compute_instance_from_template.compute_instance.*.zone,
google_compute_instance_from_template.compute_instance[*].self_link,
google_compute_instance_from_template.compute_instance[*].zone,
[local.zones[count.index]],
)

Expand Down
6 changes: 3 additions & 3 deletions modules/umig/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

output "self_links" {
description = "List of self-links for unmanaged instance groups"
value = google_compute_instance_group.instance_group.*.self_link
value = google_compute_instance_group.instance_group[*].self_link
}

output "umig_details" {
description = "List of all details for unmanaged instance groups"
value = google_compute_instance_group.instance_group.*
value = google_compute_instance_group.instance_group[*]
}

output "instances_self_links" {
Expand All @@ -31,7 +31,7 @@ output "instances_self_links" {

output "instances_details" {
description = "List of all details for compute instances"
value = google_compute_instance_from_template.compute_instance.*
value = google_compute_instance_from_template.compute_instance[*]
}

output "available_zones" {
Expand Down
5 changes: 4 additions & 1 deletion modules/umig/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
terraform {
required_version = ">=0.13.0"
required_providers {
google = ">= 3.88, < 5.0"
google = {
source = "hashicorp/google"
version = ">= 3.88, < 5.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-vm:umig/v9.0.0"
Expand Down

0 comments on commit f141bd4

Please sign in to comment.