All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.cloudrunv2.kotlin.JobArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudrunv2.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudrunv2.JobArgs.builder
import com.pulumi.gcp.cloudrunv2.kotlin.inputs.JobBinaryAuthorizationArgs
import com.pulumi.gcp.cloudrunv2.kotlin.inputs.JobBinaryAuthorizationArgsBuilder
import com.pulumi.gcp.cloudrunv2.kotlin.inputs.JobTemplateArgs
import com.pulumi.gcp.cloudrunv2.kotlin.inputs.JobTemplateArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A Cloud Run Job resource that references a container image which is run to completion.
 * To get more information about Job, see:
 * * [API documentation](https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.jobs)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/run/docs/)
 * ## Example Usage
 * ### Cloudrunv2 Job Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.cloudrunv2.Job("default", {
 *     name: "cloudrun-job",
 *     location: "us-central1",
 *     template: {
 *         template: {
 *             containers: [{
 *                 image: "us-docker.pkg.dev/cloudrun/container/hello",
 *             }],
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.cloudrunv2.Job("default",
 *     name="cloudrun-job",
 *     location="us-central1",
 *     template=gcp.cloudrunv2.JobTemplateArgs(
 *         template=gcp.cloudrunv2.JobTemplateTemplateArgs(
 *             containers=[gcp.cloudrunv2.JobTemplateTemplateContainerArgs(
 *                 image="us-docker.pkg.dev/cloudrun/container/hello",
 *             )],
 *         ),
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.CloudRunV2.Job("default", new()
 *     {
 *         Name = "cloudrun-job",
 *         Location = "us-central1",
 *         Template = new Gcp.CloudRunV2.Inputs.JobTemplateArgs
 *         {
 *             Template = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateArgs
 *             {
 *                 Containers = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerArgs
 *                     {
 *                         Image = "us-docker.pkg.dev/cloudrun/container/hello",
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrunv2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudrunv2.NewJob(ctx, "default", &cloudrunv2.JobArgs{
 * 			Name:     pulumi.String("cloudrun-job"),
 * 			Location: pulumi.String("us-central1"),
 * 			Template: &cloudrunv2.JobTemplateArgs{
 * 				Template: &cloudrunv2.JobTemplateTemplateArgs{
 * 					Containers: cloudrunv2.JobTemplateTemplateContainerArray{
 * 						&cloudrunv2.JobTemplateTemplateContainerArgs{
 * 							Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.cloudrunv2.Job;
 * import com.pulumi.gcp.cloudrunv2.JobArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var default_ = new Job("default", JobArgs.builder()
 *             .name("cloudrun-job")
 *             .location("us-central1")
 *             .template(JobTemplateArgs.builder()
 *                 .template(JobTemplateTemplateArgs.builder()
 *                     .containers(JobTemplateTemplateContainerArgs.builder()
 *                         .image("us-docker.pkg.dev/cloudrun/container/hello")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:cloudrunv2:Job
 *     properties:
 *       name: cloudrun-job
 *       location: us-central1
 *       template:
 *         template:
 *           containers:
 *             - image: us-docker.pkg.dev/cloudrun/container/hello
 * ```
 * 
 * ### Cloudrunv2 Job Limits
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.cloudrunv2.Job("default", {
 *     name: "cloudrun-job",
 *     location: "us-central1",
 *     template: {
 *         template: {
 *             containers: [{
 *                 image: "us-docker.pkg.dev/cloudrun/container/hello",
 *                 resources: {
 *                     limits: {
 *                         cpu: "2",
 *                         memory: "1024Mi",
 *                     },
 *                 },
 *             }],
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.cloudrunv2.Job("default",
 *     name="cloudrun-job",
 *     location="us-central1",
 *     template=gcp.cloudrunv2.JobTemplateArgs(
 *         template=gcp.cloudrunv2.JobTemplateTemplateArgs(
 *             containers=[gcp.cloudrunv2.JobTemplateTemplateContainerArgs(
 *                 image="us-docker.pkg.dev/cloudrun/container/hello",
 *                 resources=gcp.cloudrunv2.JobTemplateTemplateContainerResourcesArgs(
 *                     limits={
 *                         "cpu": "2",
 *                         "memory": "1024Mi",
 *                     },
 *                 ),
 *             )],
 *         ),
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.CloudRunV2.Job("default", new()
 *     {
 *         Name = "cloudrun-job",
 *         Location = "us-central1",
 *         Template = new Gcp.CloudRunV2.Inputs.JobTemplateArgs
 *         {
 *             Template = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateArgs
 *             {
 *                 Containers = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerArgs
 *                     {
 *                         Image = "us-docker.pkg.dev/cloudrun/container/hello",
 *                         Resources = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerResourcesArgs
 *                         {
 *                             Limits =
 *                             {
 *                                 { "cpu", "2" },
 *                                 { "memory", "1024Mi" },
 *                             },
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrunv2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudrunv2.NewJob(ctx, "default", &cloudrunv2.JobArgs{
 * 			Name:     pulumi.String("cloudrun-job"),
 * 			Location: pulumi.String("us-central1"),
 * 			Template: &cloudrunv2.JobTemplateArgs{
 * 				Template: &cloudrunv2.JobTemplateTemplateArgs{
 * 					Containers: cloudrunv2.JobTemplateTemplateContainerArray{
 * 						&cloudrunv2.JobTemplateTemplateContainerArgs{
 * 							Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
 * 							Resources: &cloudrunv2.JobTemplateTemplateContainerResourcesArgs{
 * 								Limits: pulumi.StringMap{
 * 									"cpu":    pulumi.String("2"),
 * 									"memory": pulumi.String("1024Mi"),
 * 								},
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.cloudrunv2.Job;
 * import com.pulumi.gcp.cloudrunv2.JobArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var default_ = new Job("default", JobArgs.builder()
 *             .name("cloudrun-job")
 *             .location("us-central1")
 *             .template(JobTemplateArgs.builder()
 *                 .template(JobTemplateTemplateArgs.builder()
 *                     .containers(JobTemplateTemplateContainerArgs.builder()
 *                         .image("us-docker.pkg.dev/cloudrun/container/hello")
 *                         .resources(JobTemplateTemplateContainerResourcesArgs.builder()
 *                             .limits(Map.ofEntries(
 *                                 Map.entry("cpu", "2"),
 *                                 Map.entry("memory", "1024Mi")
 *                             ))
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:cloudrunv2:Job
 *     properties:
 *       name: cloudrun-job
 *       location: us-central1
 *       template:
 *         template:
 *           containers:
 *             - image: us-docker.pkg.dev/cloudrun/container/hello
 *               resources:
 *                 limits:
 *                   cpu: '2'
 *                   memory: 1024Mi
 * ```
 * 
 * ### Cloudrunv2 Job Sql
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const secret = new gcp.secretmanager.Secret("secret", {
 *     secretId: "secret",
 *     replication: {
 *         auto: {},
 *     },
 * });
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "cloudrun-sql",
 *     region: "us-central1",
 *     databaseVersion: "MYSQL_5_7",
 *     settings: {
 *         tier: "db-f1-micro",
 *     },
 *     deletionProtection: true,
 * });
 * const _default = new gcp.cloudrunv2.Job("default", {
 *     name: "cloudrun-job",
 *     location: "us-central1",
 *     template: {
 *         template: {
 *             volumes: [{
 *                 name: "cloudsql",
 *                 cloudSqlInstance: {
 *                     instances: [instance.connectionName],
 *                 },
 *             }],
 *             containers: [{
 *                 image: "us-docker.pkg.dev/cloudrun/container/hello",
 *                 envs: [
 *                     {
 *                         name: "FOO",
 *                         value: "bar",
 *                     },
 *                     {
 *                         name: "latestdclsecret",
 *                         valueSource: {
 *                             secretKeyRef: {
 *                                 secret: secret.secretId,
 *                                 version: "1",
 *                             },
 *                         },
 *                     },
 *                 ],
 *                 volumeMounts: [{
 *                     name: "cloudsql",
 *                     mountPath: "/cloudsql",
 *                 }],
 *             }],
 *         },
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * const secret_version_data = new gcp.secretmanager.SecretVersion("secret-version-data", {
 *     secret: secret.name,
 *     secretData: "secret-data",
 * });
 * const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
 *     secretId: secret.id,
 *     role: "roles/secretmanager.secretAccessor",
 *     member: project.then(project => `serviceAccount:${project.number}[email protected]`),
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * secret = gcp.secretmanager.Secret("secret",
 *     secret_id="secret",
 *     replication=gcp.secretmanager.SecretReplicationArgs(
 *         auto=gcp.secretmanager.SecretReplicationAutoArgs(),
 *     ))
 * instance = gcp.sql.DatabaseInstance("instance",
 *     name="cloudrun-sql",
 *     region="us-central1",
 *     database_version="MYSQL_5_7",
 *     settings=gcp.sql.DatabaseInstanceSettingsArgs(
 *         tier="db-f1-micro",
 *     ),
 *     deletion_protection=True)
 * default = gcp.cloudrunv2.Job("default",
 *     name="cloudrun-job",
 *     location="us-central1",
 *     template=gcp.cloudrunv2.JobTemplateArgs(
 *         template=gcp.cloudrunv2.JobTemplateTemplateArgs(
 *             volumes=[gcp.cloudrunv2.JobTemplateTemplateVolumeArgs(
 *                 name="cloudsql",
 *                 cloud_sql_instance=gcp.cloudrunv2.JobTemplateTemplateVolumeCloudSqlInstanceArgs(
 *                     instances=[instance.connection_name],
 *                 ),
 *             )],
 *             containers=[gcp.cloudrunv2.JobTemplateTemplateContainerArgs(
 *                 image="us-docker.pkg.dev/cloudrun/container/hello",
 *                 envs=[
 *                     gcp.cloudrunv2.JobTemplateTemplateContainerEnvArgs(
 *                         name="FOO",
 *                         value="bar",
 *                     ),
 *                     gcp.cloudrunv2.JobTemplateTemplateContainerEnvArgs(
 *                         name="latestdclsecret",
 *                         value_source=gcp.cloudrunv2.JobTemplateTemplateContainerEnvValueSourceArgs(
 *                             secret_key_ref=gcp.cloudrunv2.JobTemplateTemplateContainerEnvValueSourceSecretKeyRefArgs(
 *                                 secret=secret.secret_id,
 *                                 version="1",
 *                             ),
 *                         ),
 *                     ),
 *                 ],
 *                 volume_mounts=[gcp.cloudrunv2.JobTemplateTemplateContainerVolumeMountArgs(
 *                     name="cloudsql",
 *                     mount_path="/cloudsql",
 *                 )],
 *             )],
 *         ),
 *     ))
 * project = gcp.organizations.get_project()
 * secret_version_data = gcp.secretmanager.SecretVersion("secret-version-data",
 *     secret=secret.name,
 *     secret_data="secret-data")
 * secret_access = gcp.secretmanager.SecretIamMember("secret-access",
 *     secret_id=secret.id,
 *     role="roles/secretmanager.secretAccessor",
 *     member=f"serviceAccount:{project.number}[email protected]")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var secret = new Gcp.SecretManager.Secret("secret", new()
 *     {
 *         SecretId = "secret",
 *         Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
 *         {
 *             Auto = null,
 *         },
 *     });
 *     var instance = new Gcp.Sql.DatabaseInstance("instance", new()
 *     {
 *         Name = "cloudrun-sql",
 *         Region = "us-central1",
 *         DatabaseVersion = "MYSQL_5_7",
 *         Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
 *         {
 *             Tier = "db-f1-micro",
 *         },
 *         DeletionProtection = true,
 *     });
 *     var @default = new Gcp.CloudRunV2.Job("default", new()
 *     {
 *         Name = "cloudrun-job",
 *         Location = "us-central1",
 *         Template = new Gcp.CloudRunV2.Inputs.JobTemplateArgs
 *         {
 *             Template = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateArgs
 *             {
 *                 Volumes = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVolumeArgs
 *                     {
 *                         Name = "cloudsql",
 *                         CloudSqlInstance = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVolumeCloudSqlInstanceArgs
 *                         {
 *                             Instances = new[]
 *                             {
 *                                 instance.ConnectionName,
 *                             },
 *                         },
 *                     },
 *                 },
 *                 Containers = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerArgs
 *                     {
 *                         Image = "us-docker.pkg.dev/cloudrun/container/hello",
 *                         Envs = new[]
 *                         {
 *                             new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerEnvArgs
 *                             {
 *                                 Name = "FOO",
 *                                 Value = "bar",
 *                             },
 *                             new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerEnvArgs
 *                             {
 *                                 Name = "latestdclsecret",
 *                                 ValueSource = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerEnvValueSourceArgs
 *                                 {
 *                                     SecretKeyRef = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerEnvValueSourceSecretKeyRefArgs
 *                                     {
 *                                         Secret = secret.SecretId,
 *                                         Version = "1",
 *                                     },
 *                                 },
 *                             },
 *                         },
 *                         VolumeMounts = new[]
 *                         {
 *                             new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerVolumeMountArgs
 *                             {
 *                                 Name = "cloudsql",
 *                                 MountPath = "/cloudsql",
 *                             },
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *     });
 *     var project = Gcp.Organizations.GetProject.Invoke();
 *     var secret_version_data = new Gcp.SecretManager.SecretVersion("secret-version-data", new()
 *     {
 *         Secret = secret.Name,
 *         SecretData = "secret-data",
 *     });
 *     var secret_access = new Gcp.SecretManager.SecretIamMember("secret-access", new()
 *     {
 *         SecretId = secret.Id,
 *         Role = "roles/secretmanager.secretAccessor",
 *         Member = $"serviceAccount:{project.Apply(getProjectResult => getProjectResult.Number)}[email protected]",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrunv2"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/secretmanager"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/sql"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		secret, err := secretmanager.NewSecret(ctx, "secret", &secretmanager.SecretArgs{
 * 			SecretId: pulumi.String("secret"),
 * 			Replication: &secretmanager.SecretReplicationArgs{
 * 				Auto: nil,
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		instance, err := sql.NewDatabaseInstance(ctx, "instance", &sql.DatabaseInstanceArgs{
 * 			Name:            pulumi.String("cloudrun-sql"),
 * 			Region:          pulumi.String("us-central1"),
 * 			DatabaseVersion: pulumi.String("MYSQL_5_7"),
 * 			Settings: &sql.DatabaseInstanceSettingsArgs{
 * 				Tier: pulumi.String("db-f1-micro"),
 * 			},
 * 			DeletionProtection: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudrunv2.NewJob(ctx, "default", &cloudrunv2.JobArgs{
 * 			Name:     pulumi.String("cloudrun-job"),
 * 			Location: pulumi.String("us-central1"),
 * 			Template: &cloudrunv2.JobTemplateArgs{
 * 				Template: &cloudrunv2.JobTemplateTemplateArgs{
 * 					Volumes: cloudrunv2.JobTemplateTemplateVolumeArray{
 * 						&cloudrunv2.JobTemplateTemplateVolumeArgs{
 * 							Name: pulumi.String("cloudsql"),
 * 							CloudSqlInstance: &cloudrunv2.JobTemplateTemplateVolumeCloudSqlInstanceArgs{
 * 								Instances: pulumi.StringArray{
 * 									instance.ConnectionName,
 * 								},
 * 							},
 * 						},
 * 					},
 * 					Containers: cloudrunv2.JobTemplateTemplateContainerArray{
 * 						&cloudrunv2.JobTemplateTemplateContainerArgs{
 * 							Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
 * 							Envs: cloudrunv2.JobTemplateTemplateContainerEnvArray{
 * 								&cloudrunv2.JobTemplateTemplateContainerEnvArgs{
 * 									Name:  pulumi.String("FOO"),
 * 									Value: pulumi.String("bar"),
 * 								},
 * 								&cloudrunv2.JobTemplateTemplateContainerEnvArgs{
 * 									Name: pulumi.String("latestdclsecret"),
 * 									ValueSource: &cloudrunv2.JobTemplateTemplateContainerEnvValueSourceArgs{
 * 										SecretKeyRef: &cloudrunv2.JobTemplateTemplateContainerEnvValueSourceSecretKeyRefArgs{
 * 											Secret:  secret.SecretId,
 * 											Version: pulumi.String("1"),
 * 										},
 * 									},
 * 								},
 * 							},
 * 							VolumeMounts: cloudrunv2.JobTemplateTemplateContainerVolumeMountArray{
 * 								&cloudrunv2.JobTemplateTemplateContainerVolumeMountArgs{
 * 									Name:      pulumi.String("cloudsql"),
 * 									MountPath: pulumi.String("/cloudsql"),
 * 								},
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		project, err := organizations.LookupProject(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = secretmanager.NewSecretVersion(ctx, "secret-version-data", &secretmanager.SecretVersionArgs{
 * 			Secret:     secret.Name,
 * 			SecretData: pulumi.String("secret-data"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = secretmanager.NewSecretIamMember(ctx, "secret-access", &secretmanager.SecretIamMemberArgs{
 * 			SecretId: secret.ID(),
 * 			Role:     pulumi.String("roles/secretmanager.secretAccessor"),
 * 			Member:   pulumi.String(fmt.Sprintf("serviceAccount:%[email protected]", project.Number)),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.secretmanager.Secret;
 * import com.pulumi.gcp.secretmanager.SecretArgs;
 * import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
 * import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
 * import com.pulumi.gcp.sql.DatabaseInstance;
 * import com.pulumi.gcp.sql.DatabaseInstanceArgs;
 * import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
 * import com.pulumi.gcp.cloudrunv2.Job;
 * import com.pulumi.gcp.cloudrunv2.JobArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateArgs;
 * import com.pulumi.gcp.organizations.OrganizationsFunctions;
 * import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
 * import com.pulumi.gcp.secretmanager.SecretVersion;
 * import com.pulumi.gcp.secretmanager.SecretVersionArgs;
 * import com.pulumi.gcp.secretmanager.SecretIamMember;
 * import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var secret = new Secret("secret", SecretArgs.builder()
 *             .secretId("secret")
 *             .replication(SecretReplicationArgs.builder()
 *                 .auto()
 *                 .build())
 *             .build());
 *         var instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
 *             .name("cloudrun-sql")
 *             .region("us-central1")
 *             .databaseVersion("MYSQL_5_7")
 *             .settings(DatabaseInstanceSettingsArgs.builder()
 *                 .tier("db-f1-micro")
 *                 .build())
 *             .deletionProtection("true")
 *             .build());
 *         var default_ = new Job("default", JobArgs.builder()
 *             .name("cloudrun-job")
 *             .location("us-central1")
 *             .template(JobTemplateArgs.builder()
 *                 .template(JobTemplateTemplateArgs.builder()
 *                     .volumes(JobTemplateTemplateVolumeArgs.builder()
 *                         .name("cloudsql")
 *                         .cloudSqlInstance(JobTemplateTemplateVolumeCloudSqlInstanceArgs.builder()
 *                             .instances(instance.connectionName())
 *                             .build())
 *                         .build())
 *                     .containers(JobTemplateTemplateContainerArgs.builder()
 *                         .image("us-docker.pkg.dev/cloudrun/container/hello")
 *                         .envs(
 *                             JobTemplateTemplateContainerEnvArgs.builder()
 *                                 .name("FOO")
 *                                 .value("bar")
 *                                 .build(),
 *                             JobTemplateTemplateContainerEnvArgs.builder()
 *                                 .name("latestdclsecret")
 *                                 .valueSource(JobTemplateTemplateContainerEnvValueSourceArgs.builder()
 *                                     .secretKeyRef(JobTemplateTemplateContainerEnvValueSourceSecretKeyRefArgs.builder()
 *                                         .secret(secret.secretId())
 *                                         .version("1")
 *                                         .build())
 *                                     .build())
 *                                 .build())
 *                         .volumeMounts(JobTemplateTemplateContainerVolumeMountArgs.builder()
 *                             .name("cloudsql")
 *                             .mountPath("/cloudsql")
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *         final var project = OrganizationsFunctions.getProject();
 *         var secret_version_data = new SecretVersion("secret-version-data", SecretVersionArgs.builder()
 *             .secret(secret.name())
 *             .secretData("secret-data")
 *             .build());
 *         var secret_access = new SecretIamMember("secret-access", SecretIamMemberArgs.builder()
 *             .secretId(secret.id())
 *             .role("roles/secretmanager.secretAccessor")
 *             .member(String.format("serviceAccount:%[email protected]", project.applyValue(getProjectResult -> getProjectResult.number())))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:cloudrunv2:Job
 *     properties:
 *       name: cloudrun-job
 *       location: us-central1
 *       template:
 *         template:
 *           volumes:
 *             - name: cloudsql
 *               cloudSqlInstance:
 *                 instances:
 *                   - ${instance.connectionName}
 *           containers:
 *             - image: us-docker.pkg.dev/cloudrun/container/hello
 *               envs:
 *                 - name: FOO
 *                   value: bar
 *                 - name: latestdclsecret
 *                   valueSource:
 *                     secretKeyRef:
 *                       secret: ${secret.secretId}
 *                       version: '1'
 *               volumeMounts:
 *                 - name: cloudsql
 *                   mountPath: /cloudsql
 *   secret:
 *     type: gcp:secretmanager:Secret
 *     properties:
 *       secretId: secret
 *       replication:
 *         auto: {}
 *   secret-version-data:
 *     type: gcp:secretmanager:SecretVersion
 *     properties:
 *       secret: ${secret.name}
 *       secretData: secret-data
 *   secret-access:
 *     type: gcp:secretmanager:SecretIamMember
 *     properties:
 *       secretId: ${secret.id}
 *       role: roles/secretmanager.secretAccessor
 *       member: serviceAccount:${project.number}[email protected]
 *   instance:
 *     type: gcp:sql:DatabaseInstance
 *     properties:
 *       name: cloudrun-sql
 *       region: us-central1
 *       databaseVersion: MYSQL_5_7
 *       settings:
 *         tier: db-f1-micro
 *       deletionProtection: 'true'
 * variables:
 *   project:
 *     fn::invoke:
 *       Function: gcp:organizations:getProject
 *       Arguments: {}
 * ```
 * 
 * ### Cloudrunv2 Job Vpcaccess
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const customTestNetwork = new gcp.compute.Network("custom_test", {
 *     name: "run-network",
 *     autoCreateSubnetworks: false,
 * });
 * const customTest = new gcp.compute.Subnetwork("custom_test", {
 *     name: "run-subnetwork",
 *     ipCidrRange: "10.2.0.0/28",
 *     region: "us-central1",
 *     network: customTestNetwork.id,
 * });
 * const connector = new gcp.vpcaccess.Connector("connector", {
 *     name: "run-vpc",
 *     subnet: {
 *         name: customTest.name,
 *     },
 *     machineType: "e2-standard-4",
 *     minInstances: 2,
 *     maxInstances: 3,
 *     region: "us-central1",
 * });
 * const _default = new gcp.cloudrunv2.Job("default", {
 *     name: "cloudrun-job",
 *     location: "us-central1",
 *     template: {
 *         template: {
 *             containers: [{
 *                 image: "us-docker.pkg.dev/cloudrun/container/hello",
 *             }],
 *             vpcAccess: {
 *                 connector: connector.id,
 *                 egress: "ALL_TRAFFIC",
 *             },
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * custom_test_network = gcp.compute.Network("custom_test",
 *     name="run-network",
 *     auto_create_subnetworks=False)
 * custom_test = gcp.compute.Subnetwork("custom_test",
 *     name="run-subnetwork",
 *     ip_cidr_range="10.2.0.0/28",
 *     region="us-central1",
 *     network=custom_test_network.id)
 * connector = gcp.vpcaccess.Connector("connector",
 *     name="run-vpc",
 *     subnet=gcp.vpcaccess.ConnectorSubnetArgs(
 *         name=custom_test.name,
 *     ),
 *     machine_type="e2-standard-4",
 *     min_instances=2,
 *     max_instances=3,
 *     region="us-central1")
 * default = gcp.cloudrunv2.Job("default",
 *     name="cloudrun-job",
 *     location="us-central1",
 *     template=gcp.cloudrunv2.JobTemplateArgs(
 *         template=gcp.cloudrunv2.JobTemplateTemplateArgs(
 *             containers=[gcp.cloudrunv2.JobTemplateTemplateContainerArgs(
 *                 image="us-docker.pkg.dev/cloudrun/container/hello",
 *             )],
 *             vpc_access=gcp.cloudrunv2.JobTemplateTemplateVpcAccessArgs(
 *                 connector=connector.id,
 *                 egress="ALL_TRAFFIC",
 *             ),
 *         ),
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var customTestNetwork = new Gcp.Compute.Network("custom_test", new()
 *     {
 *         Name = "run-network",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var customTest = new Gcp.Compute.Subnetwork("custom_test", new()
 *     {
 *         Name = "run-subnetwork",
 *         IpCidrRange = "10.2.0.0/28",
 *         Region = "us-central1",
 *         Network = customTestNetwork.Id,
 *     });
 *     var connector = new Gcp.VpcAccess.Connector("connector", new()
 *     {
 *         Name = "run-vpc",
 *         Subnet = new Gcp.VpcAccess.Inputs.ConnectorSubnetArgs
 *         {
 *             Name = customTest.Name,
 *         },
 *         MachineType = "e2-standard-4",
 *         MinInstances = 2,
 *         MaxInstances = 3,
 *         Region = "us-central1",
 *     });
 *     var @default = new Gcp.CloudRunV2.Job("default", new()
 *     {
 *         Name = "cloudrun-job",
 *         Location = "us-central1",
 *         Template = new Gcp.CloudRunV2.Inputs.JobTemplateArgs
 *         {
 *             Template = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateArgs
 *             {
 *                 Containers = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerArgs
 *                     {
 *                         Image = "us-docker.pkg.dev/cloudrun/container/hello",
 *                     },
 *                 },
 *                 VpcAccess = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVpcAccessArgs
 *                 {
 *                     Connector = connector.Id,
 *                     Egress = "ALL_TRAFFIC",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrunv2"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/vpcaccess"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		customTestNetwork, err := compute.NewNetwork(ctx, "custom_test", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("run-network"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		customTest, err := compute.NewSubnetwork(ctx, "custom_test", &compute.SubnetworkArgs{
 * 			Name:        pulumi.String("run-subnetwork"),
 * 			IpCidrRange: pulumi.String("10.2.0.0/28"),
 * 			Region:      pulumi.String("us-central1"),
 * 			Network:     customTestNetwork.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		connector, err := vpcaccess.NewConnector(ctx, "connector", &vpcaccess.ConnectorArgs{
 * 			Name: pulumi.String("run-vpc"),
 * 			Subnet: &vpcaccess.ConnectorSubnetArgs{
 * 				Name: customTest.Name,
 * 			},
 * 			MachineType:  pulumi.String("e2-standard-4"),
 * 			MinInstances: pulumi.Int(2),
 * 			MaxInstances: pulumi.Int(3),
 * 			Region:       pulumi.String("us-central1"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudrunv2.NewJob(ctx, "default", &cloudrunv2.JobArgs{
 * 			Name:     pulumi.String("cloudrun-job"),
 * 			Location: pulumi.String("us-central1"),
 * 			Template: &cloudrunv2.JobTemplateArgs{
 * 				Template: &cloudrunv2.JobTemplateTemplateArgs{
 * 					Containers: cloudrunv2.JobTemplateTemplateContainerArray{
 * 						&cloudrunv2.JobTemplateTemplateContainerArgs{
 * 							Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
 * 						},
 * 					},
 * 					VpcAccess: &cloudrunv2.JobTemplateTemplateVpcAccessArgs{
 * 						Connector: connector.ID(),
 * 						Egress:    pulumi.String("ALL_TRAFFIC"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.vpcaccess.Connector;
 * import com.pulumi.gcp.vpcaccess.ConnectorArgs;
 * import com.pulumi.gcp.vpcaccess.inputs.ConnectorSubnetArgs;
 * import com.pulumi.gcp.cloudrunv2.Job;
 * import com.pulumi.gcp.cloudrunv2.JobArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateVpcAccessArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var customTestNetwork = new Network("customTestNetwork", NetworkArgs.builder()
 *             .name("run-network")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var customTest = new Subnetwork("customTest", SubnetworkArgs.builder()
 *             .name("run-subnetwork")
 *             .ipCidrRange("10.2.0.0/28")
 *             .region("us-central1")
 *             .network(customTestNetwork.id())
 *             .build());
 *         var connector = new Connector("connector", ConnectorArgs.builder()
 *             .name("run-vpc")
 *             .subnet(ConnectorSubnetArgs.builder()
 *                 .name(customTest.name())
 *                 .build())
 *             .machineType("e2-standard-4")
 *             .minInstances(2)
 *             .maxInstances(3)
 *             .region("us-central1")
 *             .build());
 *         var default_ = new Job("default", JobArgs.builder()
 *             .name("cloudrun-job")
 *             .location("us-central1")
 *             .template(JobTemplateArgs.builder()
 *                 .template(JobTemplateTemplateArgs.builder()
 *                     .containers(JobTemplateTemplateContainerArgs.builder()
 *                         .image("us-docker.pkg.dev/cloudrun/container/hello")
 *                         .build())
 *                     .vpcAccess(JobTemplateTemplateVpcAccessArgs.builder()
 *                         .connector(connector.id())
 *                         .egress("ALL_TRAFFIC")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:cloudrunv2:Job
 *     properties:
 *       name: cloudrun-job
 *       location: us-central1
 *       template:
 *         template:
 *           containers:
 *             - image: us-docker.pkg.dev/cloudrun/container/hello
 *           vpcAccess:
 *             connector: ${connector.id}
 *             egress: ALL_TRAFFIC
 *   connector:
 *     type: gcp:vpcaccess:Connector
 *     properties:
 *       name: run-vpc
 *       subnet:
 *         name: ${customTest.name}
 *       machineType: e2-standard-4
 *       minInstances: 2
 *       maxInstances: 3
 *       region: us-central1
 *   customTest:
 *     type: gcp:compute:Subnetwork
 *     name: custom_test
 *     properties:
 *       name: run-subnetwork
 *       ipCidrRange: 10.2.0.0/28
 *       region: us-central1
 *       network: ${customTestNetwork.id}
 *   customTestNetwork:
 *     type: gcp:compute:Network
 *     name: custom_test
 *     properties:
 *       name: run-network
 *       autoCreateSubnetworks: false
 * ```
 * 
 * ### Cloudrunv2 Job Directvpc
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.cloudrunv2.Job("default", {
 *     name: "cloudrun-job",
 *     location: "us-central1",
 *     launchStage: "GA",
 *     template: {
 *         template: {
 *             containers: [{
 *                 image: "us-docker.pkg.dev/cloudrun/container/job",
 *             }],
 *             vpcAccess: {
 *                 networkInterfaces: [{
 *                     network: "default",
 *                     subnetwork: "default",
 *                     tags: [
 *                         "tag1",
 *                         "tag2",
 *                         "tag3",
 *                     ],
 *                 }],
 *             },
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.cloudrunv2.Job("default",
 *     name="cloudrun-job",
 *     location="us-central1",
 *     launch_stage="GA",
 *     template=gcp.cloudrunv2.JobTemplateArgs(
 *         template=gcp.cloudrunv2.JobTemplateTemplateArgs(
 *             containers=[gcp.cloudrunv2.JobTemplateTemplateContainerArgs(
 *                 image="us-docker.pkg.dev/cloudrun/container/job",
 *             )],
 *             vpc_access=gcp.cloudrunv2.JobTemplateTemplateVpcAccessArgs(
 *                 network_interfaces=[gcp.cloudrunv2.JobTemplateTemplateVpcAccessNetworkInterfaceArgs(
 *                     network="default",
 *                     subnetwork="default",
 *                     tags=[
 *                         "tag1",
 *                         "tag2",
 *                         "tag3",
 *                     ],
 *                 )],
 *             ),
 *         ),
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.CloudRunV2.Job("default", new()
 *     {
 *         Name = "cloudrun-job",
 *         Location = "us-central1",
 *         LaunchStage = "GA",
 *         Template = new Gcp.CloudRunV2.Inputs.JobTemplateArgs
 *         {
 *             Template = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateArgs
 *             {
 *                 Containers = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerArgs
 *                     {
 *                         Image = "us-docker.pkg.dev/cloudrun/container/job",
 *                     },
 *                 },
 *                 VpcAccess = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVpcAccessArgs
 *                 {
 *                     NetworkInterfaces = new[]
 *                     {
 *                         new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVpcAccessNetworkInterfaceArgs
 *                         {
 *                             Network = "default",
 *                             Subnetwork = "default",
 *                             Tags = new[]
 *                             {
 *                                 "tag1",
 *                                 "tag2",
 *                                 "tag3",
 *                             },
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrunv2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudrunv2.NewJob(ctx, "default", &cloudrunv2.JobArgs{
 * 			Name:        pulumi.String("cloudrun-job"),
 * 			Location:    pulumi.String("us-central1"),
 * 			LaunchStage: pulumi.String("GA"),
 * 			Template: &cloudrunv2.JobTemplateArgs{
 * 				Template: &cloudrunv2.JobTemplateTemplateArgs{
 * 					Containers: cloudrunv2.JobTemplateTemplateContainerArray{
 * 						&cloudrunv2.JobTemplateTemplateContainerArgs{
 * 							Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/job"),
 * 						},
 * 					},
 * 					VpcAccess: &cloudrunv2.JobTemplateTemplateVpcAccessArgs{
 * 						NetworkInterfaces: cloudrunv2.JobTemplateTemplateVpcAccessNetworkInterfaceArray{
 * 							&cloudrunv2.JobTemplateTemplateVpcAccessNetworkInterfaceArgs{
 * 								Network:    pulumi.String("default"),
 * 								Subnetwork: pulumi.String("default"),
 * 								Tags: pulumi.StringArray{
 * 									pulumi.String("tag1"),
 * 									pulumi.String("tag2"),
 * 									pulumi.String("tag3"),
 * 								},
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.cloudrunv2.Job;
 * import com.pulumi.gcp.cloudrunv2.JobArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateVpcAccessArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var default_ = new Job("default", JobArgs.builder()
 *             .name("cloudrun-job")
 *             .location("us-central1")
 *             .launchStage("GA")
 *             .template(JobTemplateArgs.builder()
 *                 .template(JobTemplateTemplateArgs.builder()
 *                     .containers(JobTemplateTemplateContainerArgs.builder()
 *                         .image("us-docker.pkg.dev/cloudrun/container/job")
 *                         .build())
 *                     .vpcAccess(JobTemplateTemplateVpcAccessArgs.builder()
 *                         .networkInterfaces(JobTemplateTemplateVpcAccessNetworkInterfaceArgs.builder()
 *                             .network("default")
 *                             .subnetwork("default")
 *                             .tags(
 *                                 "tag1",
 *                                 "tag2",
 *                                 "tag3")
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:cloudrunv2:Job
 *     properties:
 *       name: cloudrun-job
 *       location: us-central1
 *       launchStage: GA
 *       template:
 *         template:
 *           containers:
 *             - image: us-docker.pkg.dev/cloudrun/container/job
 *           vpcAccess:
 *             networkInterfaces:
 *               - network: default
 *                 subnetwork: default
 *                 tags:
 *                   - tag1
 *                   - tag2
 *                   - tag3
 * ```
 * 
 * ### Cloudrunv2 Job Secret
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const secret = new gcp.secretmanager.Secret("secret", {
 *     secretId: "secret",
 *     replication: {
 *         auto: {},
 *     },
 * });
 * const _default = new gcp.cloudrunv2.Job("default", {
 *     name: "cloudrun-job",
 *     location: "us-central1",
 *     template: {
 *         template: {
 *             volumes: [{
 *                 name: "a-volume",
 *                 secret: {
 *                     secret: secret.secretId,
 *                     defaultMode: 292,
 *                     items: [{
 *                         version: "1",
 *                         path: "my-secret",
 *                         mode: 256,
 *                     }],
 *                 },
 *             }],
 *             containers: [{
 *                 image: "us-docker.pkg.dev/cloudrun/container/hello",
 *                 volumeMounts: [{
 *                     name: "a-volume",
 *                     mountPath: "/secrets",
 *                 }],
 *             }],
 *         },
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * const secret_version_data = new gcp.secretmanager.SecretVersion("secret-version-data", {
 *     secret: secret.name,
 *     secretData: "secret-data",
 * });
 * const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
 *     secretId: secret.id,
 *     role: "roles/secretmanager.secretAccessor",
 *     member: project.then(project => `serviceAccount:${project.number}[email protected]`),
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * secret = gcp.secretmanager.Secret("secret",
 *     secret_id="secret",
 *     replication=gcp.secretmanager.SecretReplicationArgs(
 *         auto=gcp.secretmanager.SecretReplicationAutoArgs(),
 *     ))
 * default = gcp.cloudrunv2.Job("default",
 *     name="cloudrun-job",
 *     location="us-central1",
 *     template=gcp.cloudrunv2.JobTemplateArgs(
 *         template=gcp.cloudrunv2.JobTemplateTemplateArgs(
 *             volumes=[gcp.cloudrunv2.JobTemplateTemplateVolumeArgs(
 *                 name="a-volume",
 *                 secret=gcp.cloudrunv2.JobTemplateTemplateVolumeSecretArgs(
 *                     secret=secret.secret_id,
 *                     default_mode=292,
 *                     items=[gcp.cloudrunv2.JobTemplateTemplateVolumeSecretItemArgs(
 *                         version="1",
 *                         path="my-secret",
 *                         mode=256,
 *                     )],
 *                 ),
 *             )],
 *             containers=[gcp.cloudrunv2.JobTemplateTemplateContainerArgs(
 *                 image="us-docker.pkg.dev/cloudrun/container/hello",
 *                 volume_mounts=[gcp.cloudrunv2.JobTemplateTemplateContainerVolumeMountArgs(
 *                     name="a-volume",
 *                     mount_path="/secrets",
 *                 )],
 *             )],
 *         ),
 *     ))
 * project = gcp.organizations.get_project()
 * secret_version_data = gcp.secretmanager.SecretVersion("secret-version-data",
 *     secret=secret.name,
 *     secret_data="secret-data")
 * secret_access = gcp.secretmanager.SecretIamMember("secret-access",
 *     secret_id=secret.id,
 *     role="roles/secretmanager.secretAccessor",
 *     member=f"serviceAccount:{project.number}[email protected]")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var secret = new Gcp.SecretManager.Secret("secret", new()
 *     {
 *         SecretId = "secret",
 *         Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
 *         {
 *             Auto = null,
 *         },
 *     });
 *     var @default = new Gcp.CloudRunV2.Job("default", new()
 *     {
 *         Name = "cloudrun-job",
 *         Location = "us-central1",
 *         Template = new Gcp.CloudRunV2.Inputs.JobTemplateArgs
 *         {
 *             Template = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateArgs
 *             {
 *                 Volumes = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVolumeArgs
 *                     {
 *                         Name = "a-volume",
 *                         Secret = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVolumeSecretArgs
 *                         {
 *                             Secret = secret.SecretId,
 *                             DefaultMode = 292,
 *                             Items = new[]
 *                             {
 *                                 new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVolumeSecretItemArgs
 *                                 {
 *                                     Version = "1",
 *                                     Path = "my-secret",
 *                                     Mode = 256,
 *                                 },
 *                             },
 *                         },
 *                     },
 *                 },
 *                 Containers = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerArgs
 *                     {
 *                         Image = "us-docker.pkg.dev/cloudrun/container/hello",
 *                         VolumeMounts = new[]
 *                         {
 *                             new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerVolumeMountArgs
 *                             {
 *                                 Name = "a-volume",
 *                                 MountPath = "/secrets",
 *                             },
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *     });
 *     var project = Gcp.Organizations.GetProject.Invoke();
 *     var secret_version_data = new Gcp.SecretManager.SecretVersion("secret-version-data", new()
 *     {
 *         Secret = secret.Name,
 *         SecretData = "secret-data",
 *     });
 *     var secret_access = new Gcp.SecretManager.SecretIamMember("secret-access", new()
 *     {
 *         SecretId = secret.Id,
 *         Role = "roles/secretmanager.secretAccessor",
 *         Member = $"serviceAccount:{project.Apply(getProjectResult => getProjectResult.Number)}[email protected]",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrunv2"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/secretmanager"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		secret, err := secretmanager.NewSecret(ctx, "secret", &secretmanager.SecretArgs{
 * 			SecretId: pulumi.String("secret"),
 * 			Replication: &secretmanager.SecretReplicationArgs{
 * 				Auto: nil,
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudrunv2.NewJob(ctx, "default", &cloudrunv2.JobArgs{
 * 			Name:     pulumi.String("cloudrun-job"),
 * 			Location: pulumi.String("us-central1"),
 * 			Template: &cloudrunv2.JobTemplateArgs{
 * 				Template: &cloudrunv2.JobTemplateTemplateArgs{
 * 					Volumes: cloudrunv2.JobTemplateTemplateVolumeArray{
 * 						&cloudrunv2.JobTemplateTemplateVolumeArgs{
 * 							Name: pulumi.String("a-volume"),
 * 							Secret: &cloudrunv2.JobTemplateTemplateVolumeSecretArgs{
 * 								Secret:      secret.SecretId,
 * 								DefaultMode: pulumi.Int(292),
 * 								Items: cloudrunv2.JobTemplateTemplateVolumeSecretItemArray{
 * 									&cloudrunv2.JobTemplateTemplateVolumeSecretItemArgs{
 * 										Version: pulumi.String("1"),
 * 										Path:    pulumi.String("my-secret"),
 * 										Mode:    pulumi.Int(256),
 * 									},
 * 								},
 * 							},
 * 						},
 * 					},
 * 					Containers: cloudrunv2.JobTemplateTemplateContainerArray{
 * 						&cloudrunv2.JobTemplateTemplateContainerArgs{
 * 							Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
 * 							VolumeMounts: cloudrunv2.JobTemplateTemplateContainerVolumeMountArray{
 * 								&cloudrunv2.JobTemplateTemplateContainerVolumeMountArgs{
 * 									Name:      pulumi.String("a-volume"),
 * 									MountPath: pulumi.String("/secrets"),
 * 								},
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		project, err := organizations.LookupProject(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = secretmanager.NewSecretVersion(ctx, "secret-version-data", &secretmanager.SecretVersionArgs{
 * 			Secret:     secret.Name,
 * 			SecretData: pulumi.String("secret-data"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = secretmanager.NewSecretIamMember(ctx, "secret-access", &secretmanager.SecretIamMemberArgs{
 * 			SecretId: secret.ID(),
 * 			Role:     pulumi.String("roles/secretmanager.secretAccessor"),
 * 			Member:   pulumi.String(fmt.Sprintf("serviceAccount:%[email protected]", project.Number)),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.secretmanager.Secret;
 * import com.pulumi.gcp.secretmanager.SecretArgs;
 * import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
 * import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
 * import com.pulumi.gcp.cloudrunv2.Job;
 * import com.pulumi.gcp.cloudrunv2.JobArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateArgs;
 * import com.pulumi.gcp.organizations.OrganizationsFunctions;
 * import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
 * import com.pulumi.gcp.secretmanager.SecretVersion;
 * import com.pulumi.gcp.secretmanager.SecretVersionArgs;
 * import com.pulumi.gcp.secretmanager.SecretIamMember;
 * import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var secret = new Secret("secret", SecretArgs.builder()
 *             .secretId("secret")
 *             .replication(SecretReplicationArgs.builder()
 *                 .auto()
 *                 .build())
 *             .build());
 *         var default_ = new Job("default", JobArgs.builder()
 *             .name("cloudrun-job")
 *             .location("us-central1")
 *             .template(JobTemplateArgs.builder()
 *                 .template(JobTemplateTemplateArgs.builder()
 *                     .volumes(JobTemplateTemplateVolumeArgs.builder()
 *                         .name("a-volume")
 *                         .secret(JobTemplateTemplateVolumeSecretArgs.builder()
 *                             .secret(secret.secretId())
 *                             .defaultMode(292)
 *                             .items(JobTemplateTemplateVolumeSecretItemArgs.builder()
 *                                 .version("1")
 *                                 .path("my-secret")
 *                                 .mode(256)
 *                                 .build())
 *                             .build())
 *                         .build())
 *                     .containers(JobTemplateTemplateContainerArgs.builder()
 *                         .image("us-docker.pkg.dev/cloudrun/container/hello")
 *                         .volumeMounts(JobTemplateTemplateContainerVolumeMountArgs.builder()
 *                             .name("a-volume")
 *                             .mountPath("/secrets")
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *         final var project = OrganizationsFunctions.getProject();
 *         var secret_version_data = new SecretVersion("secret-version-data", SecretVersionArgs.builder()
 *             .secret(secret.name())
 *             .secretData("secret-data")
 *             .build());
 *         var secret_access = new SecretIamMember("secret-access", SecretIamMemberArgs.builder()
 *             .secretId(secret.id())
 *             .role("roles/secretmanager.secretAccessor")
 *             .member(String.format("serviceAccount:%[email protected]", project.applyValue(getProjectResult -> getProjectResult.number())))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:cloudrunv2:Job
 *     properties:
 *       name: cloudrun-job
 *       location: us-central1
 *       template:
 *         template:
 *           volumes:
 *             - name: a-volume
 *               secret:
 *                 secret: ${secret.secretId}
 *                 defaultMode: 292
 *                 items:
 *                   - version: '1'
 *                     path: my-secret
 *                     mode: 256
 *           containers:
 *             - image: us-docker.pkg.dev/cloudrun/container/hello
 *               volumeMounts:
 *                 - name: a-volume
 *                   mountPath: /secrets
 *   secret:
 *     type: gcp:secretmanager:Secret
 *     properties:
 *       secretId: secret
 *       replication:
 *         auto: {}
 *   secret-version-data:
 *     type: gcp:secretmanager:SecretVersion
 *     properties:
 *       secret: ${secret.name}
 *       secretData: secret-data
 *   secret-access:
 *     type: gcp:secretmanager:SecretIamMember
 *     properties:
 *       secretId: ${secret.id}
 *       role: roles/secretmanager.secretAccessor
 *       member: serviceAccount:${project.number}[email protected]
 * variables:
 *   project:
 *     fn::invoke:
 *       Function: gcp:organizations:getProject
 *       Arguments: {}
 * ```
 * 
 * ### Cloudrunv2 Job Emptydir
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.cloudrunv2.Job("default", {
 *     name: "cloudrun-job",
 *     location: "us-central1",
 *     launchStage: "BETA",
 *     template: {
 *         template: {
 *             containers: [{
 *                 image: "us-docker.pkg.dev/cloudrun/container/hello",
 *                 volumeMounts: [{
 *                     name: "empty-dir-volume",
 *                     mountPath: "/mnt",
 *                 }],
 *             }],
 *             volumes: [{
 *                 name: "empty-dir-volume",
 *                 emptyDir: {
 *                     medium: "MEMORY",
 *                     sizeLimit: "128Mi",
 *                 },
 *             }],
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.cloudrunv2.Job("default",
 *     name="cloudrun-job",
 *     location="us-central1",
 *     launch_stage="BETA",
 *     template=gcp.cloudrunv2.JobTemplateArgs(
 *         template=gcp.cloudrunv2.JobTemplateTemplateArgs(
 *             containers=[gcp.cloudrunv2.JobTemplateTemplateContainerArgs(
 *                 image="us-docker.pkg.dev/cloudrun/container/hello",
 *                 volume_mounts=[gcp.cloudrunv2.JobTemplateTemplateContainerVolumeMountArgs(
 *                     name="empty-dir-volume",
 *                     mount_path="/mnt",
 *                 )],
 *             )],
 *             volumes=[gcp.cloudrunv2.JobTemplateTemplateVolumeArgs(
 *                 name="empty-dir-volume",
 *                 empty_dir=gcp.cloudrunv2.JobTemplateTemplateVolumeEmptyDirArgs(
 *                     medium="MEMORY",
 *                     size_limit="128Mi",
 *                 ),
 *             )],
 *         ),
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.CloudRunV2.Job("default", new()
 *     {
 *         Name = "cloudrun-job",
 *         Location = "us-central1",
 *         LaunchStage = "BETA",
 *         Template = new Gcp.CloudRunV2.Inputs.JobTemplateArgs
 *         {
 *             Template = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateArgs
 *             {
 *                 Containers = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerArgs
 *                     {
 *                         Image = "us-docker.pkg.dev/cloudrun/container/hello",
 *                         VolumeMounts = new[]
 *                         {
 *                             new Gcp.CloudRunV2.Inputs.JobTemplateTemplateContainerVolumeMountArgs
 *                             {
 *                                 Name = "empty-dir-volume",
 *                                 MountPath = "/mnt",
 *                             },
 *                         },
 *                     },
 *                 },
 *                 Volumes = new[]
 *                 {
 *                     new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVolumeArgs
 *                     {
 *                         Name = "empty-dir-volume",
 *                         EmptyDir = new Gcp.CloudRunV2.Inputs.JobTemplateTemplateVolumeEmptyDirArgs
 *                         {
 *                             Medium = "MEMORY",
 *                             SizeLimit = "128Mi",
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrunv2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudrunv2.NewJob(ctx, "default", &cloudrunv2.JobArgs{
 * 			Name:        pulumi.String("cloudrun-job"),
 * 			Location:    pulumi.String("us-central1"),
 * 			LaunchStage: pulumi.String("BETA"),
 * 			Template: &cloudrunv2.JobTemplateArgs{
 * 				Template: &cloudrunv2.JobTemplateTemplateArgs{
 * 					Containers: cloudrunv2.JobTemplateTemplateContainerArray{
 * 						&cloudrunv2.JobTemplateTemplateContainerArgs{
 * 							Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
 * 							VolumeMounts: cloudrunv2.JobTemplateTemplateContainerVolumeMountArray{
 * 								&cloudrunv2.JobTemplateTemplateContainerVolumeMountArgs{
 * 									Name:      pulumi.String("empty-dir-volume"),
 * 									MountPath: pulumi.String("/mnt"),
 * 								},
 * 							},
 * 						},
 * 					},
 * 					Volumes: cloudrunv2.JobTemplateTemplateVolumeArray{
 * 						&cloudrunv2.JobTemplateTemplateVolumeArgs{
 * 							Name: pulumi.String("empty-dir-volume"),
 * 							EmptyDir: &cloudrunv2.JobTemplateTemplateVolumeEmptyDirArgs{
 * 								Medium:    pulumi.String("MEMORY"),
 * 								SizeLimit: pulumi.String("128Mi"),
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.cloudrunv2.Job;
 * import com.pulumi.gcp.cloudrunv2.JobArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateArgs;
 * import com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var default_ = new Job("default", JobArgs.builder()
 *             .name("cloudrun-job")
 *             .location("us-central1")
 *             .launchStage("BETA")
 *             .template(JobTemplateArgs.builder()
 *                 .template(JobTemplateTemplateArgs.builder()
 *                     .containers(JobTemplateTemplateContainerArgs.builder()
 *                         .image("us-docker.pkg.dev/cloudrun/container/hello")
 *                         .volumeMounts(JobTemplateTemplateContainerVolumeMountArgs.builder()
 *                             .name("empty-dir-volume")
 *                             .mountPath("/mnt")
 *                             .build())
 *                         .build())
 *                     .volumes(JobTemplateTemplateVolumeArgs.builder()
 *                         .name("empty-dir-volume")
 *                         .emptyDir(JobTemplateTemplateVolumeEmptyDirArgs.builder()
 *                             .medium("MEMORY")
 *                             .sizeLimit("128Mi")
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:cloudrunv2:Job
 *     properties:
 *       name: cloudrun-job
 *       location: us-central1
 *       launchStage: BETA
 *       template:
 *         template:
 *           containers:
 *             - image: us-docker.pkg.dev/cloudrun/container/hello
 *               volumeMounts:
 *                 - name: empty-dir-volume
 *                   mountPath: /mnt
 *           volumes:
 *             - name: empty-dir-volume
 *               emptyDir:
 *                 medium: MEMORY
 *                 sizeLimit: 128Mi
 * ```
 * 
 * ## Import
 * Job can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/jobs/{{name}}`
 * * `{{project}}/{{location}}/{{name}}`
 * * `{{location}}/{{name}}`
 * When using the `pulumi import` command, Job can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:cloudrunv2/job:Job default projects/{{project}}/locations/{{location}}/jobs/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:cloudrunv2/job:Job default {{project}}/{{location}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:cloudrunv2/job:Job default {{location}}/{{name}}
 * ```
 * @property annotations Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and
 * should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com',
 * 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected on new
 * resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes
 * annotations' namespacing, limits, and rules. **Note**: This field is non-authoritative, and will only manage the
 * annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations
 * present on the resource.
 * @property binaryAuthorization Settings for the Binary Authorization feature.
 * @property client Arbitrary identifier for the API client.
 * @property clientVersion Arbitrary version identifier for the API client.
 * @property labels Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with
 * Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment,
 * state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or
 * https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with
 * 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they
 * will be rejected. All system labels in v1 now have a corresponding field in v2 Job. **Note**: This field is
 * non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
 * 'effective_labels' for all of the labels present on the resource.
 * @property launchStage The launch stage as defined by [Google Cloud Platform Launch
 * Stages](https://cloud.google.com/products#product-launch-stages). Cloud Run supports ALPHA, BETA, and GA. If no value is
 * specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that
 * stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as
 * input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values:
 * ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
 * @property location The location of the cloud run job
 * @property name Name of the Job.
 * @property project
 * @property template The template used to create executions for this Job.
 * Structure is documented below.
 */
public data class JobArgs(
    public val annotations: Output>? = null,
    public val binaryAuthorization: Output? = null,
    public val client: Output? = null,
    public val clientVersion: Output? = null,
    public val labels: Output>? = null,
    public val launchStage: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val template: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudrunv2.JobArgs =
        com.pulumi.gcp.cloudrunv2.JobArgs.builder()
            .annotations(
                annotations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .binaryAuthorization(
                binaryAuthorization?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .client(client?.applyValue({ args0 -> args0 }))
            .clientVersion(clientVersion?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .launchStage(launchStage?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .template(template?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [JobArgs].
 */
@PulumiTagMarker
public class JobArgsBuilder internal constructor() {
    private var annotations: Output>? = null

    private var binaryAuthorization: Output? = null

    private var client: Output? = null

    private var clientVersion: Output? = null

    private var labels: Output>? = null

    private var launchStage: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var template: Output? = null

    /**
     * @param value Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and
     * should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com',
     * 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected on new
     * resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes
     * annotations' namespacing, limits, and rules. **Note**: This field is non-authoritative, and will only manage the
     * annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations
     * present on the resource.
     */
    @JvmName("fryinbtgjpjtnulm")
    public suspend fun annotations(`value`: Output>) {
        this.annotations = value
    }

    /**
     * @param value Settings for the Binary Authorization feature.
     */
    @JvmName("fapjyscmiqnglewe")
    public suspend fun binaryAuthorization(`value`: Output) {
        this.binaryAuthorization = value
    }

    /**
     * @param value Arbitrary identifier for the API client.
     */
    @JvmName("dqdmrkjsfsikpqty")
    public suspend fun client(`value`: Output) {
        this.client = value
    }

    /**
     * @param value Arbitrary version identifier for the API client.
     */
    @JvmName("dfkiftacldeivngb")
    public suspend fun clientVersion(`value`: Output) {
        this.clientVersion = value
    }

    /**
     * @param value Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with
     * Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment,
     * state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or
     * https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with
     * 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they
     * will be rejected. All system labels in v1 now have a corresponding field in v2 Job. **Note**: This field is
     * non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
     * 'effective_labels' for all of the labels present on the resource.
     */
    @JvmName("enfafhtqgvxunhma")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The launch stage as defined by [Google Cloud Platform Launch
   * Stages](https://cloud.google.com/products#product-launch-stages). Cloud Run supports ALPHA, BETA, and GA. If no value is
     * specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that
     * stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as
     * input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values:
     * ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
     */
    @JvmName("oibrtisfcdjhhuhg")
    public suspend fun launchStage(`value`: Output) {
        this.launchStage = value
    }

    /**
     * @param value The location of the cloud run job
     */
    @JvmName("ybeivyvakjidwcpo")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Name of the Job.
     */
    @JvmName("yvxgpoupgctffotf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @JvmName("jrhgqmdphpxtpwtg")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The template used to create executions for this Job.
     * Structure is documented below.
     */
    @JvmName("vmtissftrowxdnqs")
    public suspend fun template(`value`: Output) {
        this.template = value
    }

    /**
     * @param value Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and
     * should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com',
     * 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected on new
     * resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes
     * annotations' namespacing, limits, and rules. **Note**: This field is non-authoritative, and will only manage the
     * annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations
     * present on the resource.
     */
    @JvmName("mcgcghwlvskjrfjp")
    public suspend fun annotations(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param values Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and
     * should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com',
     * 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected on new
     * resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes
     * annotations' namespacing, limits, and rules. **Note**: This field is non-authoritative, and will only manage the
     * annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations
     * present on the resource.
     */
    @JvmName("ysjvyndqwwsfbbqe")
    public fun annotations(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param value Settings for the Binary Authorization feature.
     */
    @JvmName("htkhykpcilpqeupc")
    public suspend fun binaryAuthorization(`value`: JobBinaryAuthorizationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.binaryAuthorization = mapped
    }

    /**
     * @param argument Settings for the Binary Authorization feature.
     */
    @JvmName("yocqbvrwuqljqhrc")
    public suspend fun binaryAuthorization(argument: suspend JobBinaryAuthorizationArgsBuilder.() -> Unit) {
        val toBeMapped = JobBinaryAuthorizationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.binaryAuthorization = mapped
    }

    /**
     * @param value Arbitrary identifier for the API client.
     */
    @JvmName("qwfuychusjwdoqta")
    public suspend fun client(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.client = mapped
    }

    /**
     * @param value Arbitrary version identifier for the API client.
     */
    @JvmName("gkboakjokcypimgd")
    public suspend fun clientVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientVersion = mapped
    }

    /**
     * @param value Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with
     * Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment,
     * state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or
     * https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with
     * 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they
     * will be rejected. All system labels in v1 now have a corresponding field in v2 Job. **Note**: This field is
     * non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
     * 'effective_labels' for all of the labels present on the resource.
     */
    @JvmName("ltsqsvfcgatjleil")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with
     * Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment,
     * state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or
     * https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with
     * 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they
     * will be rejected. All system labels in v1 now have a corresponding field in v2 Job. **Note**: This field is
     * non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
     * 'effective_labels' for all of the labels present on the resource.
     */
    @JvmName("acxsyqrsdujfbxvd")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The launch stage as defined by [Google Cloud Platform Launch
   * Stages](https://cloud.google.com/products#product-launch-stages). Cloud Run supports ALPHA, BETA, and GA. If no value is
     * specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that
     * stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as
     * input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values:
     * ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
     */
    @JvmName("cpocdmkabwyrkmrh")
    public suspend fun launchStage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.launchStage = mapped
    }

    /**
     * @param value The location of the cloud run job
     */
    @JvmName("lfxeoilbwnhnkcii")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Name of the Job.
     */
    @JvmName("mgnpmlxadchghhba")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @JvmName("ybicgxjupecsbeeu")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The template used to create executions for this Job.
     * Structure is documented below.
     */
    @JvmName("usfjctgoeqsyhsrs")
    public suspend fun template(`value`: JobTemplateArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.template = mapped
    }

    /**
     * @param argument The template used to create executions for this Job.
     * Structure is documented below.
     */
    @JvmName("ucjwjmcowmvbmwwm")
    public suspend fun template(argument: suspend JobTemplateArgsBuilder.() -> Unit) {
        val toBeMapped = JobTemplateArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.template = mapped
    }

    internal fun build(): JobArgs = JobArgs(
        annotations = annotations,
        binaryAuthorization = binaryAuthorization,
        client = client,
        clientVersion = clientVersion,
        labels = labels,
        launchStage = launchStage,
        location = location,
        name = name,
        project = project,
        template = template,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy