Skip to content

Commit

Permalink
update version constraints to the ~> style
Browse files Browse the repository at this point in the history
  • Loading branch information
jarpat committed Jan 22, 2024
1 parent d55018d commit d91c26c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ data "google_container_engine_versions" "gke-version" {

module "gke" {
source = "terraform-google-modules/kubernetes-engine/google//modules/private-cluster"
version = "29.0.0"
version = "~> 29.0.0"
project_id = var.project
name = "${var.prefix}-gke"
region = local.region
Expand Down Expand Up @@ -239,7 +239,7 @@ resource "local_file" "kubeconfig" {
# Module Registry - https://registry.terraform.io/modules/GoogleCloudPlatform/sql-db/google/12.0.0/submodules/postgresql
module "postgresql" {
source = "GoogleCloudPlatform/sql-db/google//modules/postgresql"
version = "18.2.0"
version = "~> 18.2.0"
project_id = var.project

for_each = local.postgres_servers != null ? length(local.postgres_servers) != 0 ? local.postgres_servers : {} : {}
Expand Down Expand Up @@ -291,7 +291,7 @@ module "postgresql" {

module "sql_proxy_sa" {
source = "terraform-google-modules/service-accounts/google"
version = "4.2.2"
version = "~> 4.2.2"
count = var.postgres_servers != null ? length(var.postgres_servers) != 0 ? 1 : 0 : 0
project_id = var.project
prefix = var.prefix
Expand Down
2 changes: 1 addition & 1 deletion modules/google_vm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module "address" {
source = "terraform-google-modules/address/google"
version = "3.2.0"
version = "~> 3.2.0"
project_id = var.project
region = var.region
address_type = "EXTERNAL"
Expand Down
4 changes: 2 additions & 2 deletions network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data "google_compute_address" "nat_address" {
module "nat_address" {
count = length(var.nat_address_name) == 0 ? 1 : 0
source = "terraform-google-modules/address/google"
version = "3.2.0"
version = "~> 3.2.0"
project_id = var.project
region = local.region
address_type = "EXTERNAL"
Expand All @@ -23,7 +23,7 @@ module "nat_address" {
module "cloud_nat" {
count = length(var.nat_address_name) == 0 ? 1 : 0
source = "terraform-google-modules/cloud-nat/google"
version = "5.0.0"
version = "~> 5.0.0"
project_id = var.project
name = "${var.prefix}-cloud-nat"
region = local.region
Expand Down
12 changes: 6 additions & 6 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@ terraform {
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.25.2" # Constrained by Google
version = "~> 2.25.2" # Constrained by Google
}
local = {
source = "hashicorp/local"
version = "2.4.1"
version = "~> 2.4.1"
}
random = {
source = "hashicorp/random"
version = "3.6.0" # Constrained by Google
version = "~> 3.6.0" # Constrained by Google
}
null = {
source = "hashicorp/null"
version = "3.2.2" # Constrained by Google
version = "~> 3.2.2" # Constrained by Google
}
external = {
source = "hashicorp/external"
version = "2.3.2" # Constrained by Google
version = "~> 2.3.2" # Constrained by Google
}
time = {
source = "hashicorp/time"
version = "0.10.0"
version = "~> 0.10.0"
}
}
}

0 comments on commit d91c26c

Please sign in to comment.