forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Direct VPC egress support for Cloud Run V2 resources (GoogleClou…
- Loading branch information
Showing
6 changed files
with
281 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
mmv1/templates/terraform/examples/cloudrunv2_job_directvpc.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
resource "google_cloud_run_v2_job" "<%= ctx[:primary_resource_id] %>" { | ||
name = "<%= ctx[:vars]['cloud_run_job_name'] %>" | ||
location = "us-central1" | ||
launch_stage = "BETA" | ||
template { | ||
template{ | ||
containers { | ||
image = "us-docker.pkg.dev/cloudrun/container/job" | ||
} | ||
vpc_access { | ||
network_interfaces { | ||
network = "default" | ||
subnetwork = "default" | ||
tags = ["tag1", "tag2", "tag3"] | ||
} | ||
egress = "ALL_TRAFFIC" | ||
} | ||
} | ||
} | ||
|
||
lifecycle { | ||
ignore_changes = [ | ||
launch_stage, | ||
] | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
mmv1/templates/terraform/examples/cloudrunv2_service_directvpc.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
resource "google_cloud_run_v2_service" "<%= ctx[:primary_resource_id] %>" { | ||
name = "<%= ctx[:vars]['cloud_run_service_name'] %>" | ||
location = "us-central1" | ||
launch_stage = "BETA" | ||
template { | ||
containers { | ||
image = "us-docker.pkg.dev/cloudrun/container/hello" | ||
} | ||
vpc_access{ | ||
network_interfaces { | ||
network = "default" | ||
subnetwork = "default" | ||
tags = ["tag1", "tag2", "tag3"] | ||
} | ||
egress = "ALL_TRAFFIC" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters