Skip to content

Commit

Permalink
chore: update examples to use registry (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb authored Dec 20, 2023
1 parent 93812b4 commit 4b6d809
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 22 deletions.
3 changes: 3 additions & 0 deletions build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

timeout: 3600s
steps:
- id: swap-module-refs
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['module-swapper']
- id: prepare
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && prepare_environment']
Expand Down
3 changes: 2 additions & 1 deletion examples/onprem_demo/vpc_sc_project/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ resource "google_dns_record_set" "a" {
/***************************************/

module "regular_service_perimeter_1" {
source = "../../../modules/regular_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/regular_service_perimeter"
version = "~> 5.0"
policy = var.access_policy_name
perimeter_name = "regular_perimeter_1"
description = "VPC Service Controls perimeter"
Expand Down
12 changes: 9 additions & 3 deletions examples/simple_example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
*/

module "access_context_manager_policy" {
source = "../.."
source = "terraform-google-modules/vpc-service-controls/google"
version = "~> 5.0"

parent_id = var.parent_id
policy_name = var.policy_name
}

module "access_level_members" {
source = "../../modules/access_level"
source = "terraform-google-modules/vpc-service-controls/google//modules/access_level"
version = "~> 5.0"

description = "Simple Example Access Level"
policy = module.access_context_manager_policy.policy_id
name = var.access_level_name
Expand All @@ -38,7 +42,9 @@ resource "null_resource" "wait_for_members" {
}

module "regular_service_perimeter_1" {
source = "../../modules/regular_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/regular_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = var.perimeter_name

Expand Down
12 changes: 9 additions & 3 deletions examples/simple_example_access_level/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,27 @@
*/

module "access_context_manager_policy" {
source = "../.."
source = "terraform-google-modules/vpc-service-controls/google"
version = "~> 5.0"

parent_id = var.parent_id
policy_name = var.policy_name
}

module "access_level_1" {
source = "../../modules/access_level"
source = "terraform-google-modules/vpc-service-controls/google//modules/access_level"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
name = "single_ip_policy"
ip_subnetworks = var.ip_subnetworks
description = "Some description"
}

module "regular_service_perimeter_1" {
source = "../../modules/regular_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/regular_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = "regular_perimeter_1"
description = "Some description"
Expand Down
16 changes: 12 additions & 4 deletions examples/simple_example_access_level_dry_run/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,37 @@
*/

module "access_context_manager_policy" {
source = "../.."
source = "terraform-google-modules/vpc-service-controls/google"
version = "~> 5.0"

parent_id = var.parent_id
policy_name = var.policy_name
}

module "access_level_1" {
source = "../../modules/access_level"
source = "terraform-google-modules/vpc-service-controls/google//modules/access_level"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
name = "single_ip_policy"
ip_subnetworks = var.ip_subnetworks
description = "Some description"
}

module "access_level_2" {
source = "../../modules/access_level"
source = "terraform-google-modules/vpc-service-controls/google//modules/access_level"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
name = "single_ip_policy_dry_run"
ip_subnetworks = var.ip_subnetworks
description = "Some description"
}

module "regular_service_perimeter_1" {
source = "../../modules/regular_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/regular_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = "regular_perimeter_1"
description = "Some description"
Expand Down
16 changes: 12 additions & 4 deletions examples/simple_example_bridge/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
*/

module "access_context_manager_policy" {
source = "../.."
source = "terraform-google-modules/vpc-service-controls/google"
version = "~> 5.0"

parent_id = var.parent_id
policy_name = var.policy_name
}

module "bridge_service_perimeter_1" {
source = "../../modules/bridge_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/bridge_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = "bridge_perimeter_1"
description = "Some description"
Expand All @@ -33,7 +37,9 @@ module "bridge_service_perimeter_1" {
}

module "regular_service_perimeter_1" {
source = "../../modules/regular_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/regular_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = "regular_perimeter_1"
description = "Some description"
Expand All @@ -47,7 +53,9 @@ module "regular_service_perimeter_1" {
}

module "regular_service_perimeter_2" {
source = "../../modules/regular_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/regular_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = "regular_perimeter_2"
description = "Some description"
Expand Down
16 changes: 12 additions & 4 deletions examples/simple_example_dynamic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
*/

module "access_context_manager_policy" {
source = "../.."
source = "terraform-google-modules/vpc-service-controls/google"
version = "~> 5.0"

parent_id = var.parent_id
policy_name = var.policy_name
}

module "bridge" {
source = "../../modules/bridge_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/bridge_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = "bridge_perimeter_1"
description = "Some description"
Expand All @@ -36,7 +40,9 @@ module "bridge" {
}

module "regular_service_perimeter_1" {
source = "../../modules/regular_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/regular_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = "regular_perimeter_1"
description = "Some description"
Expand All @@ -50,7 +56,9 @@ module "regular_service_perimeter_1" {
}

module "regular_service_perimeter_2" {
source = "../../modules/regular_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/regular_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = "regular_perimeter_2"
description = "Some description"
Expand Down
12 changes: 9 additions & 3 deletions examples/simple_example_with_ingress_rule/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
*/

module "access_context_manager_policy" {
source = "../.."
source = "terraform-google-modules/vpc-service-controls/google"
version = "~> 5.0"

parent_id = var.parent_id
policy_name = var.policy_name
}

module "access_level_members" {
source = "../../modules/access_level"
source = "terraform-google-modules/vpc-service-controls/google//modules/access_level"
version = "~> 5.0"

description = "Simple Example Access Level"
policy = module.access_context_manager_policy.policy_id
name = var.access_level_name
Expand All @@ -38,7 +42,9 @@ resource "null_resource" "wait_for_members" {
}

module "regular_service_perimeter_1" {
source = "../../modules/regular_service_perimeter"
source = "terraform-google-modules/vpc-service-controls/google//modules/regular_service_perimeter"
version = "~> 5.0"

policy = module.access_context_manager_policy.policy_id
perimeter_name = var.perimeter_name

Expand Down

0 comments on commit 4b6d809

Please sign in to comment.