1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. cloudfunctions
  5. Function
Google Cloud Classic v7.28.0 published on Friday, Jun 21, 2024 by Pulumi

gcp.cloudfunctions.Function

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.28.0 published on Friday, Jun 21, 2024 by Pulumi

    Creates a new Cloud Function. For more information see:

    Warning: As of November 1, 2019, newly created Functions are private-by-default and will require appropriate IAM permissions to be invoked. See below examples for how to set up the appropriate permissions, or view the Cloud Functions IAM resources for Cloud Functions.

    Example Usage

    Public Function

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const bucket = new gcp.storage.Bucket("bucket", {
        name: "test-bucket",
        location: "US",
    });
    const archive = new gcp.storage.BucketObject("archive", {
        name: "index.zip",
        bucket: bucket.name,
        source: new pulumi.asset.FileAsset("./path/to/zip/file/which/contains/code"),
    });
    const _function = new gcp.cloudfunctions.Function("function", {
        name: "function-test",
        description: "My function",
        runtime: "nodejs16",
        availableMemoryMb: 128,
        sourceArchiveBucket: bucket.name,
        sourceArchiveObject: archive.name,
        triggerHttp: true,
        entryPoint: "helloGET",
    });
    // IAM entry for all users to invoke the function
    const invoker = new gcp.cloudfunctions.FunctionIamMember("invoker", {
        project: _function.project,
        region: _function.region,
        cloudFunction: _function.name,
        role: "roles/cloudfunctions.invoker",
        member: "allUsers",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    bucket = gcp.storage.Bucket("bucket",
        name="test-bucket",
        location="US")
    archive = gcp.storage.BucketObject("archive",
        name="index.zip",
        bucket=bucket.name,
        source=pulumi.FileAsset("./path/to/zip/file/which/contains/code"))
    function = gcp.cloudfunctions.Function("function",
        name="function-test",
        description="My function",
        runtime="nodejs16",
        available_memory_mb=128,
        source_archive_bucket=bucket.name,
        source_archive_object=archive.name,
        trigger_http=True,
        entry_point="helloGET")
    # IAM entry for all users to invoke the function
    invoker = gcp.cloudfunctions.FunctionIamMember("invoker",
        project=function.project,
        region=function.region,
        cloud_function=function.name,
        role="roles/cloudfunctions.invoker",
        member="allUsers")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudfunctions"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
    			Name:     pulumi.String("test-bucket"),
    			Location: pulumi.String("US"),
    		})
    		if err != nil {
    			return err
    		}
    		archive, err := storage.NewBucketObject(ctx, "archive", &storage.BucketObjectArgs{
    			Name:   pulumi.String("index.zip"),
    			Bucket: bucket.Name,
    			Source: pulumi.NewFileAsset("./path/to/zip/file/which/contains/code"),
    		})
    		if err != nil {
    			return err
    		}
    		function, err := cloudfunctions.NewFunction(ctx, "function", &cloudfunctions.FunctionArgs{
    			Name:                pulumi.String("function-test"),
    			Description:         pulumi.String("My function"),
    			Runtime:             pulumi.String("nodejs16"),
    			AvailableMemoryMb:   pulumi.Int(128),
    			SourceArchiveBucket: bucket.Name,
    			SourceArchiveObject: archive.Name,
    			TriggerHttp:         pulumi.Bool(true),
    			EntryPoint:          pulumi.String("helloGET"),
    		})
    		if err != nil {
    			return err
    		}
    		// IAM entry for all users to invoke the function
    		_, err = cloudfunctions.NewFunctionIamMember(ctx, "invoker", &cloudfunctions.FunctionIamMemberArgs{
    			Project:       function.Project,
    			Region:        function.Region,
    			CloudFunction: function.Name,
    			Role:          pulumi.String("roles/cloudfunctions.invoker"),
    			Member:        pulumi.String("allUsers"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var bucket = new Gcp.Storage.Bucket("bucket", new()
        {
            Name = "test-bucket",
            Location = "US",
        });
    
        var archive = new Gcp.Storage.BucketObject("archive", new()
        {
            Name = "index.zip",
            Bucket = bucket.Name,
            Source = new FileAsset("./path/to/zip/file/which/contains/code"),
        });
    
        var function = new Gcp.CloudFunctions.Function("function", new()
        {
            Name = "function-test",
            Description = "My function",
            Runtime = "nodejs16",
            AvailableMemoryMb = 128,
            SourceArchiveBucket = bucket.Name,
            SourceArchiveObject = archive.Name,
            TriggerHttp = true,
            EntryPoint = "helloGET",
        });
    
        // IAM entry for all users to invoke the function
        var invoker = new Gcp.CloudFunctions.FunctionIamMember("invoker", new()
        {
            Project = function.Project,
            Region = function.Region,
            CloudFunction = function.Name,
            Role = "roles/cloudfunctions.invoker",
            Member = "allUsers",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.storage.BucketObject;
    import com.pulumi.gcp.storage.BucketObjectArgs;
    import com.pulumi.gcp.cloudfunctions.Function;
    import com.pulumi.gcp.cloudfunctions.FunctionArgs;
    import com.pulumi.gcp.cloudfunctions.FunctionIamMember;
    import com.pulumi.gcp.cloudfunctions.FunctionIamMemberArgs;
    import com.pulumi.asset.FileAsset;
    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 bucket = new Bucket("bucket", BucketArgs.builder()
                .name("test-bucket")
                .location("US")
                .build());
    
            var archive = new BucketObject("archive", BucketObjectArgs.builder()
                .name("index.zip")
                .bucket(bucket.name())
                .source(new FileAsset("./path/to/zip/file/which/contains/code"))
                .build());
    
            var function = new Function("function", FunctionArgs.builder()
                .name("function-test")
                .description("My function")
                .runtime("nodejs16")
                .availableMemoryMb(128)
                .sourceArchiveBucket(bucket.name())
                .sourceArchiveObject(archive.name())
                .triggerHttp(true)
                .entryPoint("helloGET")
                .build());
    
            // IAM entry for all users to invoke the function
            var invoker = new FunctionIamMember("invoker", FunctionIamMemberArgs.builder()
                .project(function.project())
                .region(function.region())
                .cloudFunction(function.name())
                .role("roles/cloudfunctions.invoker")
                .member("allUsers")
                .build());
    
        }
    }
    
    resources:
      bucket:
        type: gcp:storage:Bucket
        properties:
          name: test-bucket
          location: US
      archive:
        type: gcp:storage:BucketObject
        properties:
          name: index.zip
          bucket: ${bucket.name}
          source:
            fn::FileAsset: ./path/to/zip/file/which/contains/code
      function:
        type: gcp:cloudfunctions:Function
        properties:
          name: function-test
          description: My function
          runtime: nodejs16
          availableMemoryMb: 128
          sourceArchiveBucket: ${bucket.name}
          sourceArchiveObject: ${archive.name}
          triggerHttp: true
          entryPoint: helloGET
      # IAM entry for all users to invoke the function
      invoker:
        type: gcp:cloudfunctions:FunctionIamMember
        properties:
          project: ${function.project}
          region: ${function.region}
          cloudFunction: ${function.name}
          role: roles/cloudfunctions.invoker
          member: allUsers
    

    Single User

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const bucket = new gcp.storage.Bucket("bucket", {
        name: "test-bucket",
        location: "US",
    });
    const archive = new gcp.storage.BucketObject("archive", {
        name: "index.zip",
        bucket: bucket.name,
        source: new pulumi.asset.FileAsset("./path/to/zip/file/which/contains/code"),
    });
    const _function = new gcp.cloudfunctions.Function("function", {
        name: "function-test",
        description: "My function",
        runtime: "nodejs16",
        availableMemoryMb: 128,
        sourceArchiveBucket: bucket.name,
        sourceArchiveObject: archive.name,
        triggerHttp: true,
        httpsTriggerSecurityLevel: "SECURE_ALWAYS",
        timeout: 60,
        entryPoint: "helloGET",
        labels: {
            "my-label": "my-label-value",
        },
        environmentVariables: {
            MY_ENV_VAR: "my-env-var-value",
        },
    });
    // IAM entry for a single user to invoke the function
    const invoker = new gcp.cloudfunctions.FunctionIamMember("invoker", {
        project: _function.project,
        region: _function.region,
        cloudFunction: _function.name,
        role: "roles/cloudfunctions.invoker",
        member: "user:myFunctionInvoker@example.com",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    bucket = gcp.storage.Bucket("bucket",
        name="test-bucket",
        location="US")
    archive = gcp.storage.BucketObject("archive",
        name="index.zip",
        bucket=bucket.name,
        source=pulumi.FileAsset("./path/to/zip/file/which/contains/code"))
    function = gcp.cloudfunctions.Function("function",
        name="function-test",
        description="My function",
        runtime="nodejs16",
        available_memory_mb=128,
        source_archive_bucket=bucket.name,
        source_archive_object=archive.name,
        trigger_http=True,
        https_trigger_security_level="SECURE_ALWAYS",
        timeout=60,
        entry_point="helloGET",
        labels={
            "my-label": "my-label-value",
        },
        environment_variables={
            "MY_ENV_VAR": "my-env-var-value",
        })
    # IAM entry for a single user to invoke the function
    invoker = gcp.cloudfunctions.FunctionIamMember("invoker",
        project=function.project,
        region=function.region,
        cloud_function=function.name,
        role="roles/cloudfunctions.invoker",
        member="user:myFunctionInvoker@example.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudfunctions"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
    			Name:     pulumi.String("test-bucket"),
    			Location: pulumi.String("US"),
    		})
    		if err != nil {
    			return err
    		}
    		archive, err := storage.NewBucketObject(ctx, "archive", &storage.BucketObjectArgs{
    			Name:   pulumi.String("index.zip"),
    			Bucket: bucket.Name,
    			Source: pulumi.NewFileAsset("./path/to/zip/file/which/contains/code"),
    		})
    		if err != nil {
    			return err
    		}
    		function, err := cloudfunctions.NewFunction(ctx, "function", &cloudfunctions.FunctionArgs{
    			Name:                      pulumi.String("function-test"),
    			Description:               pulumi.String("My function"),
    			Runtime:                   pulumi.String("nodejs16"),
    			AvailableMemoryMb:         pulumi.Int(128),
    			SourceArchiveBucket:       bucket.Name,
    			SourceArchiveObject:       archive.Name,
    			TriggerHttp:               pulumi.Bool(true),
    			HttpsTriggerSecurityLevel: pulumi.String("SECURE_ALWAYS"),
    			Timeout:                   pulumi.Int(60),
    			EntryPoint:                pulumi.String("helloGET"),
    			Labels: pulumi.Map{
    				"my-label": pulumi.Any("my-label-value"),
    			},
    			EnvironmentVariables: pulumi.Map{
    				"MY_ENV_VAR": pulumi.Any("my-env-var-value"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// IAM entry for a single user to invoke the function
    		_, err = cloudfunctions.NewFunctionIamMember(ctx, "invoker", &cloudfunctions.FunctionIamMemberArgs{
    			Project:       function.Project,
    			Region:        function.Region,
    			CloudFunction: function.Name,
    			Role:          pulumi.String("roles/cloudfunctions.invoker"),
    			Member:        pulumi.String("user:myFunctionInvoker@example.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var bucket = new Gcp.Storage.Bucket("bucket", new()
        {
            Name = "test-bucket",
            Location = "US",
        });
    
        var archive = new Gcp.Storage.BucketObject("archive", new()
        {
            Name = "index.zip",
            Bucket = bucket.Name,
            Source = new FileAsset("./path/to/zip/file/which/contains/code"),
        });
    
        var function = new Gcp.CloudFunctions.Function("function", new()
        {
            Name = "function-test",
            Description = "My function",
            Runtime = "nodejs16",
            AvailableMemoryMb = 128,
            SourceArchiveBucket = bucket.Name,
            SourceArchiveObject = archive.Name,
            TriggerHttp = true,
            HttpsTriggerSecurityLevel = "SECURE_ALWAYS",
            Timeout = 60,
            EntryPoint = "helloGET",
            Labels = 
            {
                { "my-label", "my-label-value" },
            },
            EnvironmentVariables = 
            {
                { "MY_ENV_VAR", "my-env-var-value" },
            },
        });
    
        // IAM entry for a single user to invoke the function
        var invoker = new Gcp.CloudFunctions.FunctionIamMember("invoker", new()
        {
            Project = function.Project,
            Region = function.Region,
            CloudFunction = function.Name,
            Role = "roles/cloudfunctions.invoker",
            Member = "user:myFunctionInvoker@example.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.storage.Bucket;
    import com.pulumi.gcp.storage.BucketArgs;
    import com.pulumi.gcp.storage.BucketObject;
    import com.pulumi.gcp.storage.BucketObjectArgs;
    import com.pulumi.gcp.cloudfunctions.Function;
    import com.pulumi.gcp.cloudfunctions.FunctionArgs;
    import com.pulumi.gcp.cloudfunctions.FunctionIamMember;
    import com.pulumi.gcp.cloudfunctions.FunctionIamMemberArgs;
    import com.pulumi.asset.FileAsset;
    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 bucket = new Bucket("bucket", BucketArgs.builder()
                .name("test-bucket")
                .location("US")
                .build());
    
            var archive = new BucketObject("archive", BucketObjectArgs.builder()
                .name("index.zip")
                .bucket(bucket.name())
                .source(new FileAsset("./path/to/zip/file/which/contains/code"))
                .build());
    
            var function = new Function("function", FunctionArgs.builder()
                .name("function-test")
                .description("My function")
                .runtime("nodejs16")
                .availableMemoryMb(128)
                .sourceArchiveBucket(bucket.name())
                .sourceArchiveObject(archive.name())
                .triggerHttp(true)
                .httpsTriggerSecurityLevel("SECURE_ALWAYS")
                .timeout(60)
                .entryPoint("helloGET")
                .labels(Map.of("my-label", "my-label-value"))
                .environmentVariables(Map.of("MY_ENV_VAR", "my-env-var-value"))
                .build());
    
            // IAM entry for a single user to invoke the function
            var invoker = new FunctionIamMember("invoker", FunctionIamMemberArgs.builder()
                .project(function.project())
                .region(function.region())
                .cloudFunction(function.name())
                .role("roles/cloudfunctions.invoker")
                .member("user:myFunctionInvoker@example.com")
                .build());
    
        }
    }
    
    resources:
      bucket:
        type: gcp:storage:Bucket
        properties:
          name: test-bucket
          location: US
      archive:
        type: gcp:storage:BucketObject
        properties:
          name: index.zip
          bucket: ${bucket.name}
          source:
            fn::FileAsset: ./path/to/zip/file/which/contains/code
      function:
        type: gcp:cloudfunctions:Function
        properties:
          name: function-test
          description: My function
          runtime: nodejs16
          availableMemoryMb: 128
          sourceArchiveBucket: ${bucket.name}
          sourceArchiveObject: ${archive.name}
          triggerHttp: true
          httpsTriggerSecurityLevel: SECURE_ALWAYS
          timeout: 60
          entryPoint: helloGET
          labels:
            my-label: my-label-value
          environmentVariables:
            MY_ENV_VAR: my-env-var-value
      # IAM entry for a single user to invoke the function
      invoker:
        type: gcp:cloudfunctions:FunctionIamMember
        properties:
          project: ${function.project}
          region: ${function.region}
          cloudFunction: ${function.name}
          role: roles/cloudfunctions.invoker
          member: user:myFunctionInvoker@example.com
    

    Create Function Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Function(name: string, args: FunctionArgs, opts?: CustomResourceOptions);
    @overload
    def Function(resource_name: str,
                 args: FunctionArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Function(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 runtime: Optional[str] = None,
                 max_instances: Optional[int] = None,
                 docker_repository: Optional[str] = None,
                 min_instances: Optional[int] = None,
                 docker_registry: Optional[str] = None,
                 name: Optional[str] = None,
                 entry_point: Optional[str] = None,
                 environment_variables: Optional[Mapping[str, Any]] = None,
                 event_trigger: Optional[FunctionEventTriggerArgs] = None,
                 https_trigger_security_level: Optional[str] = None,
                 https_trigger_url: Optional[str] = None,
                 ingress_settings: Optional[str] = None,
                 project: Optional[str] = None,
                 labels: Optional[Mapping[str, Any]] = None,
                 available_memory_mb: Optional[int] = None,
                 description: Optional[str] = None,
                 build_worker_pool: Optional[str] = None,
                 kms_key_name: Optional[str] = None,
                 region: Optional[str] = None,
                 build_environment_variables: Optional[Mapping[str, Any]] = None,
                 secret_environment_variables: Optional[Sequence[FunctionSecretEnvironmentVariableArgs]] = None,
                 secret_volumes: Optional[Sequence[FunctionSecretVolumeArgs]] = None,
                 service_account_email: Optional[str] = None,
                 source_archive_bucket: Optional[str] = None,
                 source_archive_object: Optional[str] = None,
                 source_repository: Optional[FunctionSourceRepositoryArgs] = None,
                 timeout: Optional[int] = None,
                 trigger_http: Optional[bool] = None,
                 vpc_connector: Optional[str] = None,
                 vpc_connector_egress_settings: Optional[str] = None)
    func NewFunction(ctx *Context, name string, args FunctionArgs, opts ...ResourceOption) (*Function, error)
    public Function(string name, FunctionArgs args, CustomResourceOptions? opts = null)
    public Function(String name, FunctionArgs args)
    public Function(String name, FunctionArgs args, CustomResourceOptions options)
    
    type: gcp:cloudfunctions:Function
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FunctionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FunctionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FunctionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FunctionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FunctionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var functionResource = new Gcp.CloudFunctions.Function("functionResource", new()
    {
        Runtime = "string",
        MaxInstances = 0,
        DockerRepository = "string",
        MinInstances = 0,
        DockerRegistry = "string",
        Name = "string",
        EntryPoint = "string",
        EnvironmentVariables = 
        {
            { "string", "any" },
        },
        EventTrigger = new Gcp.CloudFunctions.Inputs.FunctionEventTriggerArgs
        {
            EventType = "string",
            Resource = "string",
            FailurePolicy = new Gcp.CloudFunctions.Inputs.FunctionEventTriggerFailurePolicyArgs
            {
                Retry = false,
            },
        },
        HttpsTriggerSecurityLevel = "string",
        HttpsTriggerUrl = "string",
        IngressSettings = "string",
        Project = "string",
        Labels = 
        {
            { "string", "any" },
        },
        AvailableMemoryMb = 0,
        Description = "string",
        BuildWorkerPool = "string",
        KmsKeyName = "string",
        Region = "string",
        BuildEnvironmentVariables = 
        {
            { "string", "any" },
        },
        SecretEnvironmentVariables = new[]
        {
            new Gcp.CloudFunctions.Inputs.FunctionSecretEnvironmentVariableArgs
            {
                Key = "string",
                Secret = "string",
                Version = "string",
                ProjectId = "string",
            },
        },
        SecretVolumes = new[]
        {
            new Gcp.CloudFunctions.Inputs.FunctionSecretVolumeArgs
            {
                MountPath = "string",
                Secret = "string",
                ProjectId = "string",
                Versions = new[]
                {
                    new Gcp.CloudFunctions.Inputs.FunctionSecretVolumeVersionArgs
                    {
                        Path = "string",
                        Version = "string",
                    },
                },
            },
        },
        ServiceAccountEmail = "string",
        SourceArchiveBucket = "string",
        SourceArchiveObject = "string",
        SourceRepository = new Gcp.CloudFunctions.Inputs.FunctionSourceRepositoryArgs
        {
            Url = "string",
            DeployedUrl = "string",
        },
        Timeout = 0,
        TriggerHttp = false,
        VpcConnector = "string",
        VpcConnectorEgressSettings = "string",
    });
    
    example, err := cloudfunctions.NewFunction(ctx, "functionResource", &cloudfunctions.FunctionArgs{
    	Runtime:          pulumi.String("string"),
    	MaxInstances:     pulumi.Int(0),
    	DockerRepository: pulumi.String("string"),
    	MinInstances:     pulumi.Int(0),
    	DockerRegistry:   pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	EntryPoint:       pulumi.String("string"),
    	EnvironmentVariables: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	EventTrigger: &cloudfunctions.FunctionEventTriggerArgs{
    		EventType: pulumi.String("string"),
    		Resource:  pulumi.String("string"),
    		FailurePolicy: &cloudfunctions.FunctionEventTriggerFailurePolicyArgs{
    			Retry: pulumi.Bool(false),
    		},
    	},
    	HttpsTriggerSecurityLevel: pulumi.String("string"),
    	HttpsTriggerUrl:           pulumi.String("string"),
    	IngressSettings:           pulumi.String("string"),
    	Project:                   pulumi.String("string"),
    	Labels: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	AvailableMemoryMb: pulumi.Int(0),
    	Description:       pulumi.String("string"),
    	BuildWorkerPool:   pulumi.String("string"),
    	KmsKeyName:        pulumi.String("string"),
    	Region:            pulumi.String("string"),
    	BuildEnvironmentVariables: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	SecretEnvironmentVariables: cloudfunctions.FunctionSecretEnvironmentVariableArray{
    		&cloudfunctions.FunctionSecretEnvironmentVariableArgs{
    			Key:       pulumi.String("string"),
    			Secret:    pulumi.String("string"),
    			Version:   pulumi.String("string"),
    			ProjectId: pulumi.String("string"),
    		},
    	},
    	SecretVolumes: cloudfunctions.FunctionSecretVolumeArray{
    		&cloudfunctions.FunctionSecretVolumeArgs{
    			MountPath: pulumi.String("string"),
    			Secret:    pulumi.String("string"),
    			ProjectId: pulumi.String("string"),
    			Versions: cloudfunctions.FunctionSecretVolumeVersionArray{
    				&cloudfunctions.FunctionSecretVolumeVersionArgs{
    					Path:    pulumi.String("string"),
    					Version: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	ServiceAccountEmail: pulumi.String("string"),
    	SourceArchiveBucket: pulumi.String("string"),
    	SourceArchiveObject: pulumi.String("string"),
    	SourceRepository: &cloudfunctions.FunctionSourceRepositoryArgs{
    		Url:         pulumi.String("string"),
    		DeployedUrl: pulumi.String("string"),
    	},
    	Timeout:                    pulumi.Int(0),
    	TriggerHttp:                pulumi.Bool(false),
    	VpcConnector:               pulumi.String("string"),
    	VpcConnectorEgressSettings: pulumi.String("string"),
    })
    
    var functionResource = new Function("functionResource", FunctionArgs.builder()
        .runtime("string")
        .maxInstances(0)
        .dockerRepository("string")
        .minInstances(0)
        .dockerRegistry("string")
        .name("string")
        .entryPoint("string")
        .environmentVariables(Map.of("string", "any"))
        .eventTrigger(FunctionEventTriggerArgs.builder()
            .eventType("string")
            .resource("string")
            .failurePolicy(FunctionEventTriggerFailurePolicyArgs.builder()
                .retry(false)
                .build())
            .build())
        .httpsTriggerSecurityLevel("string")
        .httpsTriggerUrl("string")
        .ingressSettings("string")
        .project("string")
        .labels(Map.of("string", "any"))
        .availableMemoryMb(0)
        .description("string")
        .buildWorkerPool("string")
        .kmsKeyName("string")
        .region("string")
        .buildEnvironmentVariables(Map.of("string", "any"))
        .secretEnvironmentVariables(FunctionSecretEnvironmentVariableArgs.builder()
            .key("string")
            .secret("string")
            .version("string")
            .projectId("string")
            .build())
        .secretVolumes(FunctionSecretVolumeArgs.builder()
            .mountPath("string")
            .secret("string")
            .projectId("string")
            .versions(FunctionSecretVolumeVersionArgs.builder()
                .path("string")
                .version("string")
                .build())
            .build())
        .serviceAccountEmail("string")
        .sourceArchiveBucket("string")
        .sourceArchiveObject("string")
        .sourceRepository(FunctionSourceRepositoryArgs.builder()
            .url("string")
            .deployedUrl("string")
            .build())
        .timeout(0)
        .triggerHttp(false)
        .vpcConnector("string")
        .vpcConnectorEgressSettings("string")
        .build());
    
    function_resource = gcp.cloudfunctions.Function("functionResource",
        runtime="string",
        max_instances=0,
        docker_repository="string",
        min_instances=0,
        docker_registry="string",
        name="string",
        entry_point="string",
        environment_variables={
            "string": "any",
        },
        event_trigger=gcp.cloudfunctions.FunctionEventTriggerArgs(
            event_type="string",
            resource="string",
            failure_policy=gcp.cloudfunctions.FunctionEventTriggerFailurePolicyArgs(
                retry=False,
            ),
        ),
        https_trigger_security_level="string",
        https_trigger_url="string",
        ingress_settings="string",
        project="string",
        labels={
            "string": "any",
        },
        available_memory_mb=0,
        description="string",
        build_worker_pool="string",
        kms_key_name="string",
        region="string",
        build_environment_variables={
            "string": "any",
        },
        secret_environment_variables=[gcp.cloudfunctions.FunctionSecretEnvironmentVariableArgs(
            key="string",
            secret="string",
            version="string",
            project_id="string",
        )],
        secret_volumes=[gcp.cloudfunctions.FunctionSecretVolumeArgs(
            mount_path="string",
            secret="string",
            project_id="string",
            versions=[gcp.cloudfunctions.FunctionSecretVolumeVersionArgs(
                path="string",
                version="string",
            )],
        )],
        service_account_email="string",
        source_archive_bucket="string",
        source_archive_object="string",
        source_repository=gcp.cloudfunctions.FunctionSourceRepositoryArgs(
            url="string",
            deployed_url="string",
        ),
        timeout=0,
        trigger_http=False,
        vpc_connector="string",
        vpc_connector_egress_settings="string")
    
    const functionResource = new gcp.cloudfunctions.Function("functionResource", {
        runtime: "string",
        maxInstances: 0,
        dockerRepository: "string",
        minInstances: 0,
        dockerRegistry: "string",
        name: "string",
        entryPoint: "string",
        environmentVariables: {
            string: "any",
        },
        eventTrigger: {
            eventType: "string",
            resource: "string",
            failurePolicy: {
                retry: false,
            },
        },
        httpsTriggerSecurityLevel: "string",
        httpsTriggerUrl: "string",
        ingressSettings: "string",
        project: "string",
        labels: {
            string: "any",
        },
        availableMemoryMb: 0,
        description: "string",
        buildWorkerPool: "string",
        kmsKeyName: "string",
        region: "string",
        buildEnvironmentVariables: {
            string: "any",
        },
        secretEnvironmentVariables: [{
            key: "string",
            secret: "string",
            version: "string",
            projectId: "string",
        }],
        secretVolumes: [{
            mountPath: "string",
            secret: "string",
            projectId: "string",
            versions: [{
                path: "string",
                version: "string",
            }],
        }],
        serviceAccountEmail: "string",
        sourceArchiveBucket: "string",
        sourceArchiveObject: "string",
        sourceRepository: {
            url: "string",
            deployedUrl: "string",
        },
        timeout: 0,
        triggerHttp: false,
        vpcConnector: "string",
        vpcConnectorEgressSettings: "string",
    });
    
    type: gcp:cloudfunctions:Function
    properties:
        availableMemoryMb: 0
        buildEnvironmentVariables:
            string: any
        buildWorkerPool: string
        description: string
        dockerRegistry: string
        dockerRepository: string
        entryPoint: string
        environmentVariables:
            string: any
        eventTrigger:
            eventType: string
            failurePolicy:
                retry: false
            resource: string
        httpsTriggerSecurityLevel: string
        httpsTriggerUrl: string
        ingressSettings: string
        kmsKeyName: string
        labels:
            string: any
        maxInstances: 0
        minInstances: 0
        name: string
        project: string
        region: string
        runtime: string
        secretEnvironmentVariables:
            - key: string
              projectId: string
              secret: string
              version: string
        secretVolumes:
            - mountPath: string
              projectId: string
              secret: string
              versions:
                - path: string
                  version: string
        serviceAccountEmail: string
        sourceArchiveBucket: string
        sourceArchiveObject: string
        sourceRepository:
            deployedUrl: string
            url: string
        timeout: 0
        triggerHttp: false
        vpcConnector: string
        vpcConnectorEgressSettings: string
    

    Function Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Function resource accepts the following input properties:

    Runtime string
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    AvailableMemoryMb int
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    BuildEnvironmentVariables Dictionary<string, object>
    A set of key/value environment variable pairs available during build time.
    BuildWorkerPool string
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    Description string
    Description of the function.
    DockerRegistry string
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    DockerRepository string
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    EntryPoint string
    Name of the function that will be executed when the Google Cloud Function is triggered.
    EnvironmentVariables Dictionary<string, object>
    A set of key/value environment variable pairs to assign to the function.
    EventTrigger FunctionEventTrigger
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    HttpsTriggerSecurityLevel string
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    HttpsTriggerUrl string
    URL which triggers function execution. Returned only if trigger_http is used.
    IngressSettings string
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    KmsKeyName string
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    Labels Dictionary<string, object>

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    MaxInstances int
    The limit on the maximum number of function instances that may coexist at a given time.
    MinInstances int
    The limit on the minimum number of function instances that may coexist at a given time.
    Name string
    A user-defined name of the function. Function names must be unique globally.
    Project string
    Project of the function. If it is not provided, the provider project is used.
    Region string
    Region of function. If it is not provided, the provider region is used.
    SecretEnvironmentVariables List<FunctionSecretEnvironmentVariable>
    Secret environment variables configuration. Structure is documented below.
    SecretVolumes List<FunctionSecretVolume>
    Secret volumes configuration. Structure is documented below.
    ServiceAccountEmail string
    If provided, the self-provided service account to run the function with.
    SourceArchiveBucket string
    The GCS bucket containing the zip archive which contains the function.
    SourceArchiveObject string
    The source archive object (file) in archive bucket.
    SourceRepository FunctionSourceRepository
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    Timeout int
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    TriggerHttp bool
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    VpcConnector string
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    VpcConnectorEgressSettings string
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    Runtime string
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    AvailableMemoryMb int
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    BuildEnvironmentVariables map[string]interface{}
    A set of key/value environment variable pairs available during build time.
    BuildWorkerPool string
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    Description string
    Description of the function.
    DockerRegistry string
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    DockerRepository string
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    EntryPoint string
    Name of the function that will be executed when the Google Cloud Function is triggered.
    EnvironmentVariables map[string]interface{}
    A set of key/value environment variable pairs to assign to the function.
    EventTrigger FunctionEventTriggerArgs
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    HttpsTriggerSecurityLevel string
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    HttpsTriggerUrl string
    URL which triggers function execution. Returned only if trigger_http is used.
    IngressSettings string
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    KmsKeyName string
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    Labels map[string]interface{}

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    MaxInstances int
    The limit on the maximum number of function instances that may coexist at a given time.
    MinInstances int
    The limit on the minimum number of function instances that may coexist at a given time.
    Name string
    A user-defined name of the function. Function names must be unique globally.
    Project string
    Project of the function. If it is not provided, the provider project is used.
    Region string
    Region of function. If it is not provided, the provider region is used.
    SecretEnvironmentVariables []FunctionSecretEnvironmentVariableArgs
    Secret environment variables configuration. Structure is documented below.
    SecretVolumes []FunctionSecretVolumeArgs
    Secret volumes configuration. Structure is documented below.
    ServiceAccountEmail string
    If provided, the self-provided service account to run the function with.
    SourceArchiveBucket string
    The GCS bucket containing the zip archive which contains the function.
    SourceArchiveObject string
    The source archive object (file) in archive bucket.
    SourceRepository FunctionSourceRepositoryArgs
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    Timeout int
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    TriggerHttp bool
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    VpcConnector string
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    VpcConnectorEgressSettings string
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    runtime String
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    availableMemoryMb Integer
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    buildEnvironmentVariables Map<String,Object>
    A set of key/value environment variable pairs available during build time.
    buildWorkerPool String
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    description String
    Description of the function.
    dockerRegistry String
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    dockerRepository String
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    entryPoint String
    Name of the function that will be executed when the Google Cloud Function is triggered.
    environmentVariables Map<String,Object>
    A set of key/value environment variable pairs to assign to the function.
    eventTrigger FunctionEventTrigger
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    httpsTriggerSecurityLevel String
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    httpsTriggerUrl String
    URL which triggers function execution. Returned only if trigger_http is used.
    ingressSettings String
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    kmsKeyName String
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    labels Map<String,Object>

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    maxInstances Integer
    The limit on the maximum number of function instances that may coexist at a given time.
    minInstances Integer
    The limit on the minimum number of function instances that may coexist at a given time.
    name String
    A user-defined name of the function. Function names must be unique globally.
    project String
    Project of the function. If it is not provided, the provider project is used.
    region String
    Region of function. If it is not provided, the provider region is used.
    secretEnvironmentVariables List<FunctionSecretEnvironmentVariable>
    Secret environment variables configuration. Structure is documented below.
    secretVolumes List<FunctionSecretVolume>
    Secret volumes configuration. Structure is documented below.
    serviceAccountEmail String
    If provided, the self-provided service account to run the function with.
    sourceArchiveBucket String
    The GCS bucket containing the zip archive which contains the function.
    sourceArchiveObject String
    The source archive object (file) in archive bucket.
    sourceRepository FunctionSourceRepository
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    timeout Integer
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    triggerHttp Boolean
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    vpcConnector String
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    vpcConnectorEgressSettings String
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    runtime string
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    availableMemoryMb number
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    buildEnvironmentVariables {[key: string]: any}
    A set of key/value environment variable pairs available during build time.
    buildWorkerPool string
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    description string
    Description of the function.
    dockerRegistry string
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    dockerRepository string
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    entryPoint string
    Name of the function that will be executed when the Google Cloud Function is triggered.
    environmentVariables {[key: string]: any}
    A set of key/value environment variable pairs to assign to the function.
    eventTrigger FunctionEventTrigger
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    httpsTriggerSecurityLevel string
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    httpsTriggerUrl string
    URL which triggers function execution. Returned only if trigger_http is used.
    ingressSettings string
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    kmsKeyName string
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    labels {[key: string]: any}

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    maxInstances number
    The limit on the maximum number of function instances that may coexist at a given time.
    minInstances number
    The limit on the minimum number of function instances that may coexist at a given time.
    name string
    A user-defined name of the function. Function names must be unique globally.
    project string
    Project of the function. If it is not provided, the provider project is used.
    region string
    Region of function. If it is not provided, the provider region is used.
    secretEnvironmentVariables FunctionSecretEnvironmentVariable[]
    Secret environment variables configuration. Structure is documented below.
    secretVolumes FunctionSecretVolume[]
    Secret volumes configuration. Structure is documented below.
    serviceAccountEmail string
    If provided, the self-provided service account to run the function with.
    sourceArchiveBucket string
    The GCS bucket containing the zip archive which contains the function.
    sourceArchiveObject string
    The source archive object (file) in archive bucket.
    sourceRepository FunctionSourceRepository
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    timeout number
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    triggerHttp boolean
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    vpcConnector string
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    vpcConnectorEgressSettings string
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    runtime str
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    available_memory_mb int
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    build_environment_variables Mapping[str, Any]
    A set of key/value environment variable pairs available during build time.
    build_worker_pool str
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    description str
    Description of the function.
    docker_registry str
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    docker_repository str
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    entry_point str
    Name of the function that will be executed when the Google Cloud Function is triggered.
    environment_variables Mapping[str, Any]
    A set of key/value environment variable pairs to assign to the function.
    event_trigger FunctionEventTriggerArgs
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    https_trigger_security_level str
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    https_trigger_url str
    URL which triggers function execution. Returned only if trigger_http is used.
    ingress_settings str
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    kms_key_name str
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    labels Mapping[str, Any]

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    max_instances int
    The limit on the maximum number of function instances that may coexist at a given time.
    min_instances int
    The limit on the minimum number of function instances that may coexist at a given time.
    name str
    A user-defined name of the function. Function names must be unique globally.
    project str
    Project of the function. If it is not provided, the provider project is used.
    region str
    Region of function. If it is not provided, the provider region is used.
    secret_environment_variables Sequence[FunctionSecretEnvironmentVariableArgs]
    Secret environment variables configuration. Structure is documented below.
    secret_volumes Sequence[FunctionSecretVolumeArgs]
    Secret volumes configuration. Structure is documented below.
    service_account_email str
    If provided, the self-provided service account to run the function with.
    source_archive_bucket str
    The GCS bucket containing the zip archive which contains the function.
    source_archive_object str
    The source archive object (file) in archive bucket.
    source_repository FunctionSourceRepositoryArgs
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    timeout int
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    trigger_http bool
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    vpc_connector str
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    vpc_connector_egress_settings str
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    runtime String
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    availableMemoryMb Number
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    buildEnvironmentVariables Map<Any>
    A set of key/value environment variable pairs available during build time.
    buildWorkerPool String
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    description String
    Description of the function.
    dockerRegistry String
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    dockerRepository String
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    entryPoint String
    Name of the function that will be executed when the Google Cloud Function is triggered.
    environmentVariables Map<Any>
    A set of key/value environment variable pairs to assign to the function.
    eventTrigger Property Map
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    httpsTriggerSecurityLevel String
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    httpsTriggerUrl String
    URL which triggers function execution. Returned only if trigger_http is used.
    ingressSettings String
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    kmsKeyName String
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    labels Map<Any>

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    maxInstances Number
    The limit on the maximum number of function instances that may coexist at a given time.
    minInstances Number
    The limit on the minimum number of function instances that may coexist at a given time.
    name String
    A user-defined name of the function. Function names must be unique globally.
    project String
    Project of the function. If it is not provided, the provider project is used.
    region String
    Region of function. If it is not provided, the provider region is used.
    secretEnvironmentVariables List<Property Map>
    Secret environment variables configuration. Structure is documented below.
    secretVolumes List<Property Map>
    Secret volumes configuration. Structure is documented below.
    serviceAccountEmail String
    If provided, the self-provided service account to run the function with.
    sourceArchiveBucket String
    The GCS bucket containing the zip archive which contains the function.
    sourceArchiveObject String
    The source archive object (file) in archive bucket.
    sourceRepository Property Map
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    timeout Number
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    triggerHttp Boolean
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    vpcConnector String
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    vpcConnectorEgressSettings String
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Function resource produces the following output properties:

    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    Status string
    Describes the current stage of a deployment.
    VersionId string
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    Status string
    Describes the current stage of a deployment.
    VersionId string
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    status String
    Describes the current stage of a deployment.
    versionId String
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id string
    The provider-assigned unique ID for this managed resource.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    status string
    Describes the current stage of a deployment.
    versionId string
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id str
    The provider-assigned unique ID for this managed resource.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    status str
    Describes the current stage of a deployment.
    version_id str
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    status String
    Describes the current stage of a deployment.
    versionId String
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.

    Look up Existing Function Resource

    Get an existing Function resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FunctionState, opts?: CustomResourceOptions): Function
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            available_memory_mb: Optional[int] = None,
            build_environment_variables: Optional[Mapping[str, Any]] = None,
            build_worker_pool: Optional[str] = None,
            description: Optional[str] = None,
            docker_registry: Optional[str] = None,
            docker_repository: Optional[str] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            entry_point: Optional[str] = None,
            environment_variables: Optional[Mapping[str, Any]] = None,
            event_trigger: Optional[FunctionEventTriggerArgs] = None,
            https_trigger_security_level: Optional[str] = None,
            https_trigger_url: Optional[str] = None,
            ingress_settings: Optional[str] = None,
            kms_key_name: Optional[str] = None,
            labels: Optional[Mapping[str, Any]] = None,
            max_instances: Optional[int] = None,
            min_instances: Optional[int] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            region: Optional[str] = None,
            runtime: Optional[str] = None,
            secret_environment_variables: Optional[Sequence[FunctionSecretEnvironmentVariableArgs]] = None,
            secret_volumes: Optional[Sequence[FunctionSecretVolumeArgs]] = None,
            service_account_email: Optional[str] = None,
            source_archive_bucket: Optional[str] = None,
            source_archive_object: Optional[str] = None,
            source_repository: Optional[FunctionSourceRepositoryArgs] = None,
            status: Optional[str] = None,
            timeout: Optional[int] = None,
            trigger_http: Optional[bool] = None,
            version_id: Optional[str] = None,
            vpc_connector: Optional[str] = None,
            vpc_connector_egress_settings: Optional[str] = None) -> Function
    func GetFunction(ctx *Context, name string, id IDInput, state *FunctionState, opts ...ResourceOption) (*Function, error)
    public static Function Get(string name, Input<string> id, FunctionState? state, CustomResourceOptions? opts = null)
    public static Function get(String name, Output<String> id, FunctionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AvailableMemoryMb int
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    BuildEnvironmentVariables Dictionary<string, object>
    A set of key/value environment variable pairs available during build time.
    BuildWorkerPool string
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    Description string
    Description of the function.
    DockerRegistry string
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    DockerRepository string
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    EntryPoint string
    Name of the function that will be executed when the Google Cloud Function is triggered.
    EnvironmentVariables Dictionary<string, object>
    A set of key/value environment variable pairs to assign to the function.
    EventTrigger FunctionEventTrigger
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    HttpsTriggerSecurityLevel string
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    HttpsTriggerUrl string
    URL which triggers function execution. Returned only if trigger_http is used.
    IngressSettings string
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    KmsKeyName string
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    Labels Dictionary<string, object>

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    MaxInstances int
    The limit on the maximum number of function instances that may coexist at a given time.
    MinInstances int
    The limit on the minimum number of function instances that may coexist at a given time.
    Name string
    A user-defined name of the function. Function names must be unique globally.
    Project string
    Project of the function. If it is not provided, the provider project is used.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    Region string
    Region of function. If it is not provided, the provider region is used.
    Runtime string
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    SecretEnvironmentVariables List<FunctionSecretEnvironmentVariable>
    Secret environment variables configuration. Structure is documented below.
    SecretVolumes List<FunctionSecretVolume>
    Secret volumes configuration. Structure is documented below.
    ServiceAccountEmail string
    If provided, the self-provided service account to run the function with.
    SourceArchiveBucket string
    The GCS bucket containing the zip archive which contains the function.
    SourceArchiveObject string
    The source archive object (file) in archive bucket.
    SourceRepository FunctionSourceRepository
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    Status string
    Describes the current stage of a deployment.
    Timeout int
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    TriggerHttp bool
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    VersionId string
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    VpcConnector string
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    VpcConnectorEgressSettings string
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    AvailableMemoryMb int
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    BuildEnvironmentVariables map[string]interface{}
    A set of key/value environment variable pairs available during build time.
    BuildWorkerPool string
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    Description string
    Description of the function.
    DockerRegistry string
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    DockerRepository string
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    EntryPoint string
    Name of the function that will be executed when the Google Cloud Function is triggered.
    EnvironmentVariables map[string]interface{}
    A set of key/value environment variable pairs to assign to the function.
    EventTrigger FunctionEventTriggerArgs
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    HttpsTriggerSecurityLevel string
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    HttpsTriggerUrl string
    URL which triggers function execution. Returned only if trigger_http is used.
    IngressSettings string
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    KmsKeyName string
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    Labels map[string]interface{}

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    MaxInstances int
    The limit on the maximum number of function instances that may coexist at a given time.
    MinInstances int
    The limit on the minimum number of function instances that may coexist at a given time.
    Name string
    A user-defined name of the function. Function names must be unique globally.
    Project string
    Project of the function. If it is not provided, the provider project is used.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    Region string
    Region of function. If it is not provided, the provider region is used.
    Runtime string
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    SecretEnvironmentVariables []FunctionSecretEnvironmentVariableArgs
    Secret environment variables configuration. Structure is documented below.
    SecretVolumes []FunctionSecretVolumeArgs
    Secret volumes configuration. Structure is documented below.
    ServiceAccountEmail string
    If provided, the self-provided service account to run the function with.
    SourceArchiveBucket string
    The GCS bucket containing the zip archive which contains the function.
    SourceArchiveObject string
    The source archive object (file) in archive bucket.
    SourceRepository FunctionSourceRepositoryArgs
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    Status string
    Describes the current stage of a deployment.
    Timeout int
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    TriggerHttp bool
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    VersionId string
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    VpcConnector string
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    VpcConnectorEgressSettings string
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    availableMemoryMb Integer
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    buildEnvironmentVariables Map<String,Object>
    A set of key/value environment variable pairs available during build time.
    buildWorkerPool String
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    description String
    Description of the function.
    dockerRegistry String
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    dockerRepository String
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    entryPoint String
    Name of the function that will be executed when the Google Cloud Function is triggered.
    environmentVariables Map<String,Object>
    A set of key/value environment variable pairs to assign to the function.
    eventTrigger FunctionEventTrigger
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    httpsTriggerSecurityLevel String
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    httpsTriggerUrl String
    URL which triggers function execution. Returned only if trigger_http is used.
    ingressSettings String
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    kmsKeyName String
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    labels Map<String,Object>

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    maxInstances Integer
    The limit on the maximum number of function instances that may coexist at a given time.
    minInstances Integer
    The limit on the minimum number of function instances that may coexist at a given time.
    name String
    A user-defined name of the function. Function names must be unique globally.
    project String
    Project of the function. If it is not provided, the provider project is used.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    region String
    Region of function. If it is not provided, the provider region is used.
    runtime String
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    secretEnvironmentVariables List<FunctionSecretEnvironmentVariable>
    Secret environment variables configuration. Structure is documented below.
    secretVolumes List<FunctionSecretVolume>
    Secret volumes configuration. Structure is documented below.
    serviceAccountEmail String
    If provided, the self-provided service account to run the function with.
    sourceArchiveBucket String
    The GCS bucket containing the zip archive which contains the function.
    sourceArchiveObject String
    The source archive object (file) in archive bucket.
    sourceRepository FunctionSourceRepository
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    status String
    Describes the current stage of a deployment.
    timeout Integer
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    triggerHttp Boolean
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    versionId String
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    vpcConnector String
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    vpcConnectorEgressSettings String
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    availableMemoryMb number
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    buildEnvironmentVariables {[key: string]: any}
    A set of key/value environment variable pairs available during build time.
    buildWorkerPool string
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    description string
    Description of the function.
    dockerRegistry string
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    dockerRepository string
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    entryPoint string
    Name of the function that will be executed when the Google Cloud Function is triggered.
    environmentVariables {[key: string]: any}
    A set of key/value environment variable pairs to assign to the function.
    eventTrigger FunctionEventTrigger
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    httpsTriggerSecurityLevel string
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    httpsTriggerUrl string
    URL which triggers function execution. Returned only if trigger_http is used.
    ingressSettings string
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    kmsKeyName string
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    labels {[key: string]: any}

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    maxInstances number
    The limit on the maximum number of function instances that may coexist at a given time.
    minInstances number
    The limit on the minimum number of function instances that may coexist at a given time.
    name string
    A user-defined name of the function. Function names must be unique globally.
    project string
    Project of the function. If it is not provided, the provider project is used.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    region string
    Region of function. If it is not provided, the provider region is used.
    runtime string
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    secretEnvironmentVariables FunctionSecretEnvironmentVariable[]
    Secret environment variables configuration. Structure is documented below.
    secretVolumes FunctionSecretVolume[]
    Secret volumes configuration. Structure is documented below.
    serviceAccountEmail string
    If provided, the self-provided service account to run the function with.
    sourceArchiveBucket string
    The GCS bucket containing the zip archive which contains the function.
    sourceArchiveObject string
    The source archive object (file) in archive bucket.
    sourceRepository FunctionSourceRepository
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    status string
    Describes the current stage of a deployment.
    timeout number
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    triggerHttp boolean
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    versionId string
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    vpcConnector string
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    vpcConnectorEgressSettings string
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    available_memory_mb int
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    build_environment_variables Mapping[str, Any]
    A set of key/value environment variable pairs available during build time.
    build_worker_pool str
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    description str
    Description of the function.
    docker_registry str
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    docker_repository str
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    entry_point str
    Name of the function that will be executed when the Google Cloud Function is triggered.
    environment_variables Mapping[str, Any]
    A set of key/value environment variable pairs to assign to the function.
    event_trigger FunctionEventTriggerArgs
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    https_trigger_security_level str
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    https_trigger_url str
    URL which triggers function execution. Returned only if trigger_http is used.
    ingress_settings str
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    kms_key_name str
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    labels Mapping[str, Any]

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    max_instances int
    The limit on the maximum number of function instances that may coexist at a given time.
    min_instances int
    The limit on the minimum number of function instances that may coexist at a given time.
    name str
    A user-defined name of the function. Function names must be unique globally.
    project str
    Project of the function. If it is not provided, the provider project is used.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    region str
    Region of function. If it is not provided, the provider region is used.
    runtime str
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    secret_environment_variables Sequence[FunctionSecretEnvironmentVariableArgs]
    Secret environment variables configuration. Structure is documented below.
    secret_volumes Sequence[FunctionSecretVolumeArgs]
    Secret volumes configuration. Structure is documented below.
    service_account_email str
    If provided, the self-provided service account to run the function with.
    source_archive_bucket str
    The GCS bucket containing the zip archive which contains the function.
    source_archive_object str
    The source archive object (file) in archive bucket.
    source_repository FunctionSourceRepositoryArgs
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    status str
    Describes the current stage of a deployment.
    timeout int
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    trigger_http bool
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    version_id str
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    vpc_connector str
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    vpc_connector_egress_settings str
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
    availableMemoryMb Number
    Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc.
    buildEnvironmentVariables Map<Any>
    A set of key/value environment variable pairs available during build time.
    buildWorkerPool String
    Name of the Cloud Build Custom Worker Pool that should be used to build the function.
    description String
    Description of the function.
    dockerRegistry String
    Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY.
    dockerRepository String
    User-managed repository created in Artifact Registry to which the function's Docker image will be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed encryption key (CMEK). If unspecified and docker_registry is not explicitly set to CONTAINER_REGISTRY, GCF will create and use a default Artifact Registry repository named 'gcf-artifacts' in the region.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    entryPoint String
    Name of the function that will be executed when the Google Cloud Function is triggered.
    environmentVariables Map<Any>
    A set of key/value environment variable pairs to assign to the function.
    eventTrigger Property Map
    A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
    httpsTriggerSecurityLevel String
    The security level for the function. The following options are available:

    • SECURE_ALWAYS Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
    • SECURE_OPTIONAL Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
    httpsTriggerUrl String
    URL which triggers function execution. Returned only if trigger_http is used.
    ingressSettings String
    String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function.
    kmsKeyName String
    Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. If specified, you must also provide an artifact registry repository using the docker_repository field that was created with the same KMS crypto key. Before deploying, please complete all pre-requisites described in https://cloud.google.com/functions/docs/securing/cmek#granting_service_accounts_access_to_the_key
    labels Map<Any>

    A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.

    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.

    maxInstances Number
    The limit on the maximum number of function instances that may coexist at a given time.
    minInstances Number
    The limit on the minimum number of function instances that may coexist at a given time.
    name String
    A user-defined name of the function. Function names must be unique globally.
    project String
    Project of the function. If it is not provided, the provider project is used.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    region String
    Region of function. If it is not provided, the provider region is used.
    runtime String
    The runtime in which the function is going to run. Eg. "nodejs16", "python39", "dotnet3", "go116", "java11", "ruby30", "php74", etc. Check the official doc for the up-to-date list.


    secretEnvironmentVariables List<Property Map>
    Secret environment variables configuration. Structure is documented below.
    secretVolumes List<Property Map>
    Secret volumes configuration. Structure is documented below.
    serviceAccountEmail String
    If provided, the self-provided service account to run the function with.
    sourceArchiveBucket String
    The GCS bucket containing the zip archive which contains the function.
    sourceArchiveObject String
    The source archive object (file) in archive bucket.
    sourceRepository Property Map
    Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below. It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.*
    status String
    Describes the current stage of a deployment.
    timeout Number
    Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
    triggerHttp Boolean
    Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with event_trigger.
    versionId String
    The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
    vpcConnector String
    The VPC Network Connector that this cloud function can connect to. It should be set up as fully-qualified URI. The format of this field is projects/*/locations/*/connectors/*.
    vpcConnectorEgressSettings String
    The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.

    Supporting Types

    FunctionEventTrigger, FunctionEventTriggerArgs

    EventType string
    The type of event to observe. For example: "google.storage.object.finalize". See the documentation on calling Cloud Functions for a full reference of accepted triggers.
    Resource string
    Required. The name or partial URI of the resource from which to observe events. For example, "myBucket" or "projects/my-project/topics/my-topic"
    FailurePolicy FunctionEventTriggerFailurePolicy
    Specifies policy for failed executions. Structure is documented below.
    EventType string
    The type of event to observe. For example: "google.storage.object.finalize". See the documentation on calling Cloud Functions for a full reference of accepted triggers.
    Resource string
    Required. The name or partial URI of the resource from which to observe events. For example, "myBucket" or "projects/my-project/topics/my-topic"
    FailurePolicy FunctionEventTriggerFailurePolicy
    Specifies policy for failed executions. Structure is documented below.
    eventType String
    The type of event to observe. For example: "google.storage.object.finalize". See the documentation on calling Cloud Functions for a full reference of accepted triggers.
    resource String
    Required. The name or partial URI of the resource from which to observe events. For example, "myBucket" or "projects/my-project/topics/my-topic"
    failurePolicy FunctionEventTriggerFailurePolicy
    Specifies policy for failed executions. Structure is documented below.
    eventType string
    The type of event to observe. For example: "google.storage.object.finalize". See the documentation on calling Cloud Functions for a full reference of accepted triggers.
    resource string
    Required. The name or partial URI of the resource from which to observe events. For example, "myBucket" or "projects/my-project/topics/my-topic"
    failurePolicy FunctionEventTriggerFailurePolicy
    Specifies policy for failed executions. Structure is documented below.
    event_type str
    The type of event to observe. For example: "google.storage.object.finalize". See the documentation on calling Cloud Functions for a full reference of accepted triggers.
    resource str
    Required. The name or partial URI of the resource from which to observe events. For example, "myBucket" or "projects/my-project/topics/my-topic"
    failure_policy FunctionEventTriggerFailurePolicy
    Specifies policy for failed executions. Structure is documented below.
    eventType String
    The type of event to observe. For example: "google.storage.object.finalize". See the documentation on calling Cloud Functions for a full reference of accepted triggers.
    resource String
    Required. The name or partial URI of the resource from which to observe events. For example, "myBucket" or "projects/my-project/topics/my-topic"
    failurePolicy Property Map
    Specifies policy for failed executions. Structure is documented below.

    FunctionEventTriggerFailurePolicy, FunctionEventTriggerFailurePolicyArgs

    Retry bool
    Whether the function should be retried on failure. Defaults to false.
    Retry bool
    Whether the function should be retried on failure. Defaults to false.
    retry Boolean
    Whether the function should be retried on failure. Defaults to false.
    retry boolean
    Whether the function should be retried on failure. Defaults to false.
    retry bool
    Whether the function should be retried on failure. Defaults to false.
    retry Boolean
    Whether the function should be retried on failure. Defaults to false.

    FunctionSecretEnvironmentVariable, FunctionSecretEnvironmentVariableArgs

    Key string
    Name of the environment variable.
    Secret string
    ID of the secret in secret manager (not the full resource name).
    Version string
    Version of the secret (version number or the string "latest"). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.
    ProjectId string
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    Key string
    Name of the environment variable.
    Secret string
    ID of the secret in secret manager (not the full resource name).
    Version string
    Version of the secret (version number or the string "latest"). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.
    ProjectId string
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    key String
    Name of the environment variable.
    secret String
    ID of the secret in secret manager (not the full resource name).
    version String
    Version of the secret (version number or the string "latest"). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.
    projectId String
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    key string
    Name of the environment variable.
    secret string
    ID of the secret in secret manager (not the full resource name).
    version string
    Version of the secret (version number or the string "latest"). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.
    projectId string
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    key str
    Name of the environment variable.
    secret str
    ID of the secret in secret manager (not the full resource name).
    version str
    Version of the secret (version number or the string "latest"). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.
    project_id str
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    key String
    Name of the environment variable.
    secret String
    ID of the secret in secret manager (not the full resource name).
    version String
    Version of the secret (version number or the string "latest"). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.
    projectId String
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.

    FunctionSecretVolume, FunctionSecretVolumeArgs

    MountPath string
    The path within the container to mount the secret volume. For example, setting the mount_path as "/etc/secrets" would mount the secret value files under the "/etc/secrets" directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount paths: "/etc/secrets" Restricted mount paths: "/cloudsql", "/dev/log", "/pod", "/proc", "/var/log".
    Secret string
    ID of the secret in secret manager (not the full resource name).
    ProjectId string
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    Versions List<FunctionSecretVolumeVersion>
    List of secret versions to mount for this secret. If empty, the "latest" version of the secret will be made available in a file named after the secret under the mount point. Structure is documented below.
    MountPath string
    The path within the container to mount the secret volume. For example, setting the mount_path as "/etc/secrets" would mount the secret value files under the "/etc/secrets" directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount paths: "/etc/secrets" Restricted mount paths: "/cloudsql", "/dev/log", "/pod", "/proc", "/var/log".
    Secret string
    ID of the secret in secret manager (not the full resource name).
    ProjectId string
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    Versions []FunctionSecretVolumeVersion
    List of secret versions to mount for this secret. If empty, the "latest" version of the secret will be made available in a file named after the secret under the mount point. Structure is documented below.
    mountPath String
    The path within the container to mount the secret volume. For example, setting the mount_path as "/etc/secrets" would mount the secret value files under the "/etc/secrets" directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount paths: "/etc/secrets" Restricted mount paths: "/cloudsql", "/dev/log", "/pod", "/proc", "/var/log".
    secret String
    ID of the secret in secret manager (not the full resource name).
    projectId String
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    versions List<FunctionSecretVolumeVersion>
    List of secret versions to mount for this secret. If empty, the "latest" version of the secret will be made available in a file named after the secret under the mount point. Structure is documented below.
    mountPath string
    The path within the container to mount the secret volume. For example, setting the mount_path as "/etc/secrets" would mount the secret value files under the "/etc/secrets" directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount paths: "/etc/secrets" Restricted mount paths: "/cloudsql", "/dev/log", "/pod", "/proc", "/var/log".
    secret string
    ID of the secret in secret manager (not the full resource name).
    projectId string
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    versions FunctionSecretVolumeVersion[]
    List of secret versions to mount for this secret. If empty, the "latest" version of the secret will be made available in a file named after the secret under the mount point. Structure is documented below.
    mount_path str
    The path within the container to mount the secret volume. For example, setting the mount_path as "/etc/secrets" would mount the secret value files under the "/etc/secrets" directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount paths: "/etc/secrets" Restricted mount paths: "/cloudsql", "/dev/log", "/pod", "/proc", "/var/log".
    secret str
    ID of the secret in secret manager (not the full resource name).
    project_id str
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    versions Sequence[FunctionSecretVolumeVersion]
    List of secret versions to mount for this secret. If empty, the "latest" version of the secret will be made available in a file named after the secret under the mount point. Structure is documented below.
    mountPath String
    The path within the container to mount the secret volume. For example, setting the mount_path as "/etc/secrets" would mount the secret value files under the "/etc/secrets" directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount paths: "/etc/secrets" Restricted mount paths: "/cloudsql", "/dev/log", "/pod", "/proc", "/var/log".
    secret String
    ID of the secret in secret manager (not the full resource name).
    projectId String
    Project identifier (due to a known limitation, only project number is supported by this field) of the project that contains the secret. If not set, it will be populated with the function's project, assuming that the secret exists in the same project as of the function.
    versions List<Property Map>
    List of secret versions to mount for this secret. If empty, the "latest" version of the secret will be made available in a file named after the secret under the mount point. Structure is documented below.

    FunctionSecretVolumeVersion, FunctionSecretVolumeVersionArgs

    Path string
    Relative path of the file under the mount path where the secret value for this version will be fetched and made available. For example, setting the mount_path as "/etc/secrets" and path as "/secret_foo" would mount the secret value file at "/etc/secrets/secret_foo".
    Version string
    Version of the secret (version number or the string "latest"). It is preferable to use "latest" version with secret volumes as secret value changes are reflected immediately.
    Path string
    Relative path of the file under the mount path where the secret value for this version will be fetched and made available. For example, setting the mount_path as "/etc/secrets" and path as "/secret_foo" would mount the secret value file at "/etc/secrets/secret_foo".
    Version string
    Version of the secret (version number or the string "latest"). It is preferable to use "latest" version with secret volumes as secret value changes are reflected immediately.
    path String
    Relative path of the file under the mount path where the secret value for this version will be fetched and made available. For example, setting the mount_path as "/etc/secrets" and path as "/secret_foo" would mount the secret value file at "/etc/secrets/secret_foo".
    version String
    Version of the secret (version number or the string "latest"). It is preferable to use "latest" version with secret volumes as secret value changes are reflected immediately.
    path string
    Relative path of the file under the mount path where the secret value for this version will be fetched and made available. For example, setting the mount_path as "/etc/secrets" and path as "/secret_foo" would mount the secret value file at "/etc/secrets/secret_foo".
    version string
    Version of the secret (version number or the string "latest"). It is preferable to use "latest" version with secret volumes as secret value changes are reflected immediately.
    path str
    Relative path of the file under the mount path where the secret value for this version will be fetched and made available. For example, setting the mount_path as "/etc/secrets" and path as "/secret_foo" would mount the secret value file at "/etc/secrets/secret_foo".
    version str
    Version of the secret (version number or the string "latest"). It is preferable to use "latest" version with secret volumes as secret value changes are reflected immediately.
    path String
    Relative path of the file under the mount path where the secret value for this version will be fetched and made available. For example, setting the mount_path as "/etc/secrets" and path as "/secret_foo" would mount the secret value file at "/etc/secrets/secret_foo".
    version String
    Version of the secret (version number or the string "latest"). It is preferable to use "latest" version with secret volumes as secret value changes are reflected immediately.

    FunctionSourceRepository, FunctionSourceRepositoryArgs

    Url string
    The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats:

    • To refer to a specific commit: https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*
    • To refer to a moveable alias (branch): https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*. To refer to HEAD, use the master moveable alias.
    • To refer to a specific fixed alias (tag): https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*
    DeployedUrl string
    The URL pointing to the hosted repository where the function was defined at the time of deployment.
    Url string
    The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats:

    • To refer to a specific commit: https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*
    • To refer to a moveable alias (branch): https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*. To refer to HEAD, use the master moveable alias.
    • To refer to a specific fixed alias (tag): https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*
    DeployedUrl string
    The URL pointing to the hosted repository where the function was defined at the time of deployment.
    url String
    The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats:

    • To refer to a specific commit: https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*
    • To refer to a moveable alias (branch): https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*. To refer to HEAD, use the master moveable alias.
    • To refer to a specific fixed alias (tag): https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*
    deployedUrl String
    The URL pointing to the hosted repository where the function was defined at the time of deployment.
    url string
    The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats:

    • To refer to a specific commit: https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*
    • To refer to a moveable alias (branch): https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*. To refer to HEAD, use the master moveable alias.
    • To refer to a specific fixed alias (tag): https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*
    deployedUrl string
    The URL pointing to the hosted repository where the function was defined at the time of deployment.
    url str
    The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats:

    • To refer to a specific commit: https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*
    • To refer to a moveable alias (branch): https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*. To refer to HEAD, use the master moveable alias.
    • To refer to a specific fixed alias (tag): https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*
    deployed_url str
    The URL pointing to the hosted repository where the function was defined at the time of deployment.
    url String
    The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats:

    • To refer to a specific commit: https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*
    • To refer to a moveable alias (branch): https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*. To refer to HEAD, use the master moveable alias.
    • To refer to a specific fixed alias (tag): https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*
    deployedUrl String
    The URL pointing to the hosted repository where the function was defined at the time of deployment.

    Import

    Functions can be imported using the name or {{project}}/{{region}}/name, e.g.

    • {{project}}/{{region}}/{{name}}

    • {{name}}

    When using the pulumi import command, Functions can be imported using one of the formats above. For example:

    $ pulumi import gcp:cloudfunctions/function:Function default {{project}}/{{region}}/{{name}}
    
    $ pulumi import gcp:cloudfunctions/function:Function default {{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.28.0 published on Friday, Jun 21, 2024 by Pulumi