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.
Add Suport for
google_cloud_run_Job
to TGC (GoogleCloudPlatform#10599)
- Loading branch information
Showing
3 changed files
with
52 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
26 changes: 26 additions & 0 deletions
26
mmv1/third_party/tgc/tests/data/example_cloud_run_v2_job.json
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 @@ | ||
[ | ||
{ | ||
"name":"//run.googleapis.com/projects/{{.Provider.project}}/locations/us-central1/jobs/cloudrun-job", | ||
"asset_type":"run.googleapis.com/Job", | ||
"resource":{ | ||
"version":"v2", | ||
"discovery_document_uri":"https://www.googleapis.com/discovery/v1/apis/run/v2/rest", | ||
"discovery_name":"Job", | ||
"parent":"//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", | ||
"data":{ | ||
"template":{ | ||
"template":{ | ||
"containers":[ | ||
{ | ||
"image":"us-docker.pkg.dev/cloudrun/container/hello" | ||
} | ||
], | ||
"maxRetries":3 | ||
} | ||
} | ||
} | ||
}, | ||
"ancestry_path": "{{.Ancestry}}/project/{{.Provider.project}}", | ||
"ancestors": ["organizations/{{.OrgID}}"] | ||
} | ||
] |
25 changes: 25 additions & 0 deletions
25
mmv1/third_party/tgc/tests/data/example_cloud_run_v2_job.tf
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,25 @@ | ||
terraform { | ||
required_providers { | ||
google = { | ||
source = "hashicorp/google-beta" | ||
version = "~> {{.Provider.version}}" | ||
} | ||
} | ||
} | ||
|
||
provider "google" { | ||
{{if .Provider.credentials }}credentials = "{{.Provider.credentials}}"{{end}} | ||
} | ||
|
||
resource "google_cloud_run_v2_job" "default" { | ||
name = "cloudrun-job" | ||
location = "us-central1" | ||
|
||
template { | ||
template { | ||
containers { | ||
image = "us-docker.pkg.dev/cloudrun/container/hello" | ||
} | ||
} | ||
} | ||
} |