Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update examples to use registry #129

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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