Skip to content

Commit 00c0b7e

Browse files
authored
chore: update examples to use registry (#560)
1 parent 2cde7ed commit 00c0b7e

File tree

12 files changed

+45
-14
lines changed

12 files changed

+45
-14
lines changed

build/int.cloudbuild.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
timeout: 10800s
1616
steps:
17+
- id: swap-module-refs
18+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
19+
args: ['module-swapper']
1720
- id: prepare
1821
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
1922
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment']

examples/mssql-public/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616

1717
module "mssql" {
18-
source = "../../modules/mssql"
18+
source = "terraform-google-modules/sql-db/google//modules/mssql"
19+
version = "~> 18.0"
20+
1921
name = var.name
2022
random_instance_name = true
2123
project_id = var.project_id

examples/mysql-backup-create-service-account/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616

1717
module "mysql" {
18-
source = "../../modules/mysql"
18+
source = "terraform-google-modules/sql-db/google//modules/mysql"
19+
version = "~> 18.0"
20+
1921
name = "example-mysql-public"
2022
database_version = "MYSQL_8_0"
2123
random_instance_name = true
@@ -42,7 +44,9 @@ resource "google_storage_bucket" "backup" {
4244
}
4345

4446
module "backup" {
45-
source = "../../modules/backup"
47+
source = "terraform-google-modules/sql-db/google//modules/backup"
48+
version = "~> 18.0"
49+
4650
region = "us-central1"
4751
project_id = var.project_id
4852
sql_instance = module.mysql.instance_name

examples/mysql-ha/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ locals {
3232

3333

3434
module "mysql" {
35-
source = "../../modules/mysql"
35+
source = "terraform-google-modules/sql-db/google//modules/mysql"
36+
version = "~> 18.0"
37+
3638
name = var.mysql_ha_name
3739
random_instance_name = true
3840
project_id = var.project_id

examples/mysql-private/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,17 @@ module "network-safer-mysql-simple" {
3838
}
3939

4040
module "private-service-access" {
41-
source = "../../modules/private_service_access"
41+
source = "terraform-google-modules/sql-db/google//modules/private_service_access"
42+
version = "~> 18.0"
43+
4244
project_id = var.project_id
4345
vpc_network = module.network-safer-mysql-simple.network_name
4446
}
4547

4648
module "safer-mysql-db" {
47-
source = "../../modules/safer_mysql"
49+
source = "terraform-google-modules/sql-db/google//modules/safer_mysql"
50+
version = "~> 18.0"
51+
4852
name = var.db_name
4953
random_instance_name = true
5054
project_id = var.project_id

examples/mysql-psc/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ locals {
2626

2727

2828
module "mysql" {
29-
source = "../../modules/mysql"
29+
source = "terraform-google-modules/sql-db/google//modules/mysql"
30+
version = "~> 18.0"
31+
3032
name = var.mysql_ha_name
3133
random_instance_name = true
3234
project_id = var.project_id

examples/mysql-public/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ resource "random_id" "name" {
1919
}
2020

2121
module "mysql-db" {
22-
source = "../../modules/mysql"
22+
source = "terraform-google-modules/sql-db/google//modules/mysql"
23+
version = "~> 18.0"
24+
2325
name = var.db_name
2426
random_instance_name = true
2527
database_version = "MYSQL_5_6"

examples/postgresql-backup-provided-service-account/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616

1717
module "postgresql" {
18-
source = "../../modules/postgresql"
18+
source = "terraform-google-modules/sql-db/google//modules/postgresql"
19+
version = "~> 18.0"
20+
1921
name = "example-postgres"
2022
random_instance_name = true
2123
database_version = "POSTGRES_9_6"
@@ -44,7 +46,9 @@ resource "google_storage_bucket" "backup" {
4446
}
4547

4648
module "backup" {
47-
source = "../../modules/backup"
49+
source = "terraform-google-modules/sql-db/google//modules/backup"
50+
version = "~> 18.0"
51+
4852
region = "us-central1"
4953
project_id = var.project_id
5054
sql_instance = module.postgresql.instance_name

examples/postgresql-ha/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ locals {
3232
}
3333

3434
module "pg" {
35-
source = "../../modules/postgresql"
35+
source = "terraform-google-modules/sql-db/google//modules/postgresql"
36+
version = "~> 18.0"
37+
3638
name = var.pg_ha_name
3739
random_instance_name = true
3840
project_id = var.project_id

examples/postgresql-psc/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ locals {
2626
}
2727

2828
module "pg" {
29-
source = "../../modules/postgresql"
29+
source = "terraform-google-modules/sql-db/google//modules/postgresql"
30+
version = "~> 18.0"
31+
3032
name = var.pg_psc_name
3133
random_instance_name = true
3234
project_id = var.project_id

0 commit comments

Comments
 (0)