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

com.pulumi.gcp.cloudrunv2.kotlin.Job.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.gcp.cloudrunv2.kotlin.outputs.JobBinaryAuthorization
import com.pulumi.gcp.cloudrunv2.kotlin.outputs.JobCondition
import com.pulumi.gcp.cloudrunv2.kotlin.outputs.JobLatestCreatedExecution
import com.pulumi.gcp.cloudrunv2.kotlin.outputs.JobTemplate
import com.pulumi.gcp.cloudrunv2.kotlin.outputs.JobTerminalCondition
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.gcp.cloudrunv2.kotlin.outputs.JobBinaryAuthorization.Companion.toKotlin as jobBinaryAuthorizationToKotlin
import com.pulumi.gcp.cloudrunv2.kotlin.outputs.JobCondition.Companion.toKotlin as jobConditionToKotlin
import com.pulumi.gcp.cloudrunv2.kotlin.outputs.JobLatestCreatedExecution.Companion.toKotlin as jobLatestCreatedExecutionToKotlin
import com.pulumi.gcp.cloudrunv2.kotlin.outputs.JobTemplate.Companion.toKotlin as jobTemplateToKotlin
import com.pulumi.gcp.cloudrunv2.kotlin.outputs.JobTerminalCondition.Companion.toKotlin as jobTerminalConditionToKotlin

/**
 * Builder for [Job].
 */
@PulumiTagMarker
public class JobResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: JobArgs = JobArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend JobArgsBuilder.() -> Unit) {
        val builder = JobArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Job {
        val builtJavaResource = com.pulumi.gcp.cloudrunv2.Job(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Job(builtJavaResource)
    }
}

/**
 * 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}}
 * ```
 */
public class Job internal constructor(
    override val javaResource: com.pulumi.gcp.cloudrunv2.Job,
) : KotlinCustomResource(javaResource, JobMapper) {
    /**
     * 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.
     */
    public val annotations: Output>?
        get() = javaResource.annotations().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * Settings for the Binary Authorization feature.
     */
    public val binaryAuthorization: Output?
        get() = javaResource.binaryAuthorization().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> jobBinaryAuthorizationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Arbitrary identifier for the API client.
     */
    public val client: Output?
        get() = javaResource.client().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Arbitrary version identifier for the API client.
     */
    public val clientVersion: Output?
        get() = javaResource.clientVersion().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Job does not reach its desired state. See comments in reconciling for additional information on `reconciliation` process in Cloud Run.
     * Structure is documented below.
     */
    public val conditions: Output>
        get() = javaResource.conditions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    jobConditionToKotlin(args0)
                })
            })
        })

    /**
     * (Output)
     * Creation timestamp of the execution.
     * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * Email address of the authenticated creator.
     */
    public val creator: Output
        get() = javaResource.creator().applyValue({ args0 -> args0 })

    /**
     * The deletion time.
     */
    public val deleteTime: Output
        get() = javaResource.deleteTime().applyValue({ args0 -> args0 })

    public val effectiveAnnotations: Output>
        get() = javaResource.effectiveAnnotations().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    public val effectiveLabels: Output>
        get() = javaResource.effectiveLabels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
     */
    public val etag: Output
        get() = javaResource.etag().applyValue({ args0 -> args0 })

    /**
     * Number of executions created for this job.
     */
    public val executionCount: Output
        get() = javaResource.executionCount().applyValue({ args0 -> args0 })

    /**
     * For a deleted resource, the time after which it will be permamently deleted.
     */
    public val expireTime: Output
        get() = javaResource.expireTime().applyValue({ args0 -> args0 })

    /**
     * A number that monotonically increases every time the user modifies the desired state.
     */
    public val generation: Output
        get() = javaResource.generation().applyValue({ args0 -> args0 })

    /**
     * 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.
     */
    public val labels: Output>?
        get() = javaResource.labels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * Email address of the last authenticated modifier.
     */
    public val lastModifier: Output
        get() = javaResource.lastModifier().applyValue({ args0 -> args0 })

    /**
     * Name of the last created execution.
     * Structure is documented below.
     */
    public val latestCreatedExecutions: Output>
        get() = javaResource.latestCreatedExecutions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> jobLatestCreatedExecutionToKotlin(args0) })
            })
        })

    /**
     * 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"]
     */
    public val launchStage: Output
        get() = javaResource.launchStage().applyValue({ args0 -> args0 })

    /**
     * The location of the cloud run job
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * Name of the Job.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The generation of this Job. See comments in reconciling for additional information on reconciliation process in Cloud Run.
     */
    public val observedGeneration: Output
        get() = javaResource.observedGeneration().applyValue({ args0 -> args0 })

    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * The combination of labels configured directly on the resource
     * and default labels configured on the provider.
     */
    public val pulumiLabels: Output>
        get() = javaResource.pulumiLabels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * Returns true if the Job is currently being acted upon by the system to bring it into the desired state.
     * When a new Job is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Job to the desired state. This process is called reconciliation. While reconciliation is in process, observedGeneration and latest_succeeded_execution, will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the state matches the Job, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state.
     * If reconciliation succeeded, the following fields will match: observedGeneration and generation, latest_succeeded_execution and latestCreatedExecution.
     * If reconciliation failed, observedGeneration and latest_succeeded_execution will have the state of the last succeeded execution or empty for newly created Job. Additional information on the failure can be found in terminalCondition and conditions
     */
    public val reconciling: Output
        get() = javaResource.reconciling().applyValue({ args0 -> args0 })

    /**
     * The template used to create executions for this Job.
     * Structure is documented below.
     */
    public val template: Output
        get() = javaResource.template().applyValue({ args0 ->
            args0.let({ args0 ->
                jobTemplateToKotlin(args0)
            })
        })

    /**
     * The Condition of this Job, containing its readiness status, and detailed error information in case it did not reach the desired state
     * Structure is documented below.
     */
    public val terminalConditions: Output>
        get() = javaResource.terminalConditions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> jobTerminalConditionToKotlin(args0) })
            })
        })

    /**
     * Server assigned unique identifier for the Execution. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
     */
    public val uid: Output
        get() = javaResource.uid().applyValue({ args0 -> args0 })

    /**
     * The last-modified time.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object JobMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.cloudrunv2.Job::class == javaResource::class

    override fun map(javaResource: Resource): Job = Job(javaResource as com.pulumi.gcp.cloudrunv2.Job)
}

/**
 * @see [Job].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Job].
 */
public suspend fun job(name: String, block: suspend JobResourceBuilder.() -> Unit): Job {
    val builder = JobResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Job].
 * @param name The _unique_ name of the resulting resource.
 */
public fun job(name: String): Job {
    val builder = JobResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy