Skip to content

Commit 6570585

Browse files
authored
chore: update examples to use registry (#180)
1 parent 300d3eb commit 6570585

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
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: 3600s
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 ; chmod 600 /builder/home/.netrc']

examples/dependency_example/main.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ resource "random_pet" "filename" {
2525
}
2626

2727
module "hello" {
28-
source = "../.."
28+
source = "terraform-google-modules/gcloud/google"
29+
version = "~> 3.0"
2930

3031
platform = "linux"
3132
upgrade = false
@@ -36,7 +37,8 @@ module "hello" {
3637
}
3738

3839
module "two" {
39-
source = "../.."
40+
source = "terraform-google-modules/gcloud/google"
41+
version = "~> 3.0"
4042

4143
platform = "linux"
4244
upgrade = false
@@ -47,7 +49,8 @@ module "two" {
4749
}
4850

4951
module "goodbye" {
50-
source = "../.."
52+
source = "terraform-google-modules/gcloud/google"
53+
version = "~> 3.0"
5154

5255
platform = "linux"
5356
upgrade = false

examples/kubectl_wrapper_example/main.tf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ data "google_client_config" "default" {
8181
}
8282

8383
module "kubectl-imperative" {
84-
source = "../../modules/kubectl-wrapper"
84+
source = "terraform-google-modules/gcloud/google//modules/kubectl-wrapper"
85+
version = "~> 3.0"
8586

8687
project_id = var.project_id
8788
cluster_name = module.gke.name
@@ -93,7 +94,8 @@ module "kubectl-imperative" {
9394
}
9495

9596
module "kubectl-local-yaml" {
96-
source = "../../modules/kubectl-wrapper"
97+
source = "terraform-google-modules/gcloud/google//modules/kubectl-wrapper"
98+
version = "~> 3.0"
9799

98100
project_id = var.project_id
99101
cluster_name = module.gke.name
@@ -116,7 +118,8 @@ module "fleet" {
116118
}
117119

118120
module "kubectl-fleet-imperative" {
119-
source = "../../modules/kubectl-fleet-wrapper"
121+
source = "terraform-google-modules/gcloud/google//modules/kubectl-fleet-wrapper"
122+
version = "~> 3.0"
120123

121124
membership_name = module.fleet.cluster_membership_id
122125
membership_project_id = module.fleet.project_id
@@ -128,7 +131,8 @@ module "kubectl-fleet-imperative" {
128131
}
129132

130133
module "kubectl-fleet-local-yaml" {
131-
source = "../../modules/kubectl-fleet-wrapper"
134+
source = "terraform-google-modules/gcloud/google//modules/kubectl-fleet-wrapper"
135+
version = "~> 3.0"
132136

133137
membership_name = module.fleet.cluster_membership_id
134138
membership_project_id = module.fleet.project_id

examples/script_example/main.tf

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

1717
module "cli" {
18-
source = "../.."
18+
source = "terraform-google-modules/gcloud/google"
19+
version = "~> 3.0"
1920

2021
platform = "linux"
2122
additional_components = ["kubectl", "beta"]

examples/simple_example/main.tf

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

1717
module "cli" {
18-
source = "../.."
18+
source = "terraform-google-modules/gcloud/google"
19+
version = "~> 3.0"
1920

2021
platform = "linux"
2122
additional_components = ["kubectl", "beta"]
@@ -25,7 +26,8 @@ module "cli" {
2526
}
2627

2728
module "cli-disabled" {
28-
source = "../.."
29+
source = "terraform-google-modules/gcloud/google"
30+
version = "~> 3.0"
2931

3032
platform = "linux"
3133
additional_components = ["kubectl", "beta"]

0 commit comments

Comments
 (0)