Skip to content

Commit bb117bc

Browse files
authored
chore: update all example with code comment to show how to consume module from registry (#645)
1 parent 4bcc724 commit bb117bc

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

examples/backup/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ data "ibm_database_backups" "backup_database" {
2929

3030
# New postgresql instance pointing to the backup instance
3131
module "restored_icd_postgresql" {
32-
source = "../.."
32+
source = "../.."
33+
# remove the above line and uncomment the below 2 lines to consume the module from the registry
34+
# source = "terraform-ibm-modules/icd-postgresql/ibm"
35+
# version = "X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
3336
resource_group_id = module.resource_group.resource_group_id
3437
name = "${var.prefix}-postgres-restored"
3538
pg_version = var.pg_version

examples/basic/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ module "resource_group" {
1515
##############################################################################
1616

1717
module "database" {
18-
source = "../.."
18+
source = "../.."
19+
# remove the above line and uncomment the below 2 lines to consume the module from the registry
20+
# source = "terraform-ibm-modules/icd-postgresql/ibm"
21+
# version = "X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
1922
resource_group_id = module.resource_group.resource_group_id
2023
name = "${var.prefix}-data-store"
2124
pg_version = var.pg_version

examples/complete/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ module "cbr_zone" {
102102
##############################################################################
103103

104104
module "icd_postgresql" {
105-
source = "../../"
105+
source = "../../"
106+
# remove the above line and uncomment the below 2 lines to consume the module from the registry
107+
# source = "terraform-ibm-modules/icd-postgresql/ibm"
108+
# version = "X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
106109
resource_group_id = module.resource_group.resource_group_id
107110
name = "${var.prefix}-postgres"
108111
region = var.region

examples/fscloud/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ module "cbr_zone" {
5454
##############################################################################
5555

5656
module "postgresql_db" {
57-
source = "../../modules/fscloud"
57+
source = "../../modules/fscloud"
58+
# remove the above line and uncomment the below 2 lines to consume the module from the registry
59+
# source = "terraform-ibm-modules/icd-postgresql/ibm//modules/fscloud"
60+
# version = "X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
5861
resource_group_id = module.resource_group.resource_group_id
5962
name = "${var.prefix}-postgres"
6063
region = var.region

examples/pitr/main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ module "resource_group" {
1212

1313
# New ICD postgresql database instance pointing to a PITR time
1414
module "postgresql_db_pitr" {
15-
source = "../.."
15+
source = "../.."
16+
# remove the above line and uncomment the below 2 lines to consume the module from the registry
17+
# source = "terraform-ibm-modules/icd-postgresql/ibm"
18+
# version = "X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
1619
resource_group_id = module.resource_group.resource_group_id
1720
name = "${var.prefix}-postgres-pitr"
1821
region = var.region

0 commit comments

Comments
 (0)