Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.32.0 published on Wednesday, Jul 20, 2022 by Pulumi

Function

Import

function can be imported using any of these accepted formats

 $ pulumi import gcp:cloudfunctionsv2/function:Function default projects/{{project}}/locations/{{location}}/functions/{{name}}
 $ pulumi import gcp:cloudfunctionsv2/function:Function default {{project}}/{{location}}/{{name}}
 $ pulumi import gcp:cloudfunctionsv2/function:Function default {{location}}/{{name}}

Example Usage

Cloudfunctions2 Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        // [START functions_v2_basic]
        var bucket = new Gcp.Storage.Bucket("bucket", new Gcp.Storage.BucketArgs
        {
            Location = "US",
            UniformBucketLevelAccess = true,
        }, new CustomResourceOptions
        {
            Provider = google_beta,
        });
        var @object = new Gcp.Storage.BucketObject("object", new Gcp.Storage.BucketObjectArgs
        {
            Bucket = bucket.Name,
            Source = new FileAsset("path/to/index.zip"),
        }, new CustomResourceOptions
        {
            Provider = google_beta,
        });
        // Add path to the zipped function source code
        var terraform_test2 = new Gcp.CloudFunctionsV2.Function("terraform-test2", new Gcp.CloudFunctionsV2.FunctionArgs
        {
            Location = "us-central1",
            Description = "a new function",
            BuildConfig = new Gcp.CloudFunctionsV2.Inputs.FunctionBuildConfigArgs
            {
                Runtime = "nodejs16",
                EntryPoint = "helloHttp",
                Source = new Gcp.CloudFunctionsV2.Inputs.FunctionBuildConfigSourceArgs
                {
                    StorageSource = new Gcp.CloudFunctionsV2.Inputs.FunctionBuildConfigSourceStorageSourceArgs
                    {
                        Bucket = bucket.Name,
                        Object = @object.Name,
                    },
                },
            },
            ServiceConfig = new Gcp.CloudFunctionsV2.Inputs.FunctionServiceConfigArgs
            {
                MaxInstanceCount = 1,
                AvailableMemory = "256M",
                TimeoutSeconds = 60,
            },
        }, new CustomResourceOptions
        {
            Provider = google_beta,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/cloudfunctionsv2"
	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			Location:                 pulumi.String("US"),
			UniformBucketLevelAccess: pulumi.Bool(true),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		object, err := storage.NewBucketObject(ctx, "object", &storage.BucketObjectArgs{
			Bucket: bucket.Name,
			Source: pulumi.NewFileAsset("path/to/index.zip"),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = cloudfunctionsv2.NewFunction(ctx, "terraform-test2", &cloudfunctionsv2.FunctionArgs{
			Location:    pulumi.String("us-central1"),
			Description: pulumi.String("a new function"),
			BuildConfig: &cloudfunctionsv2.FunctionBuildConfigArgs{
				Runtime:    pulumi.String("nodejs16"),
				EntryPoint: pulumi.String("helloHttp"),
				Source: &cloudfunctionsv2.FunctionBuildConfigSourceArgs{
					StorageSource: &cloudfunctionsv2.FunctionBuildConfigSourceStorageSourceArgs{
						Bucket: bucket.Name,
						Object: object.Name,
					},
				},
			},
			ServiceConfig: &cloudfunctionsv2.FunctionServiceConfigArgs{
				MaxInstanceCount: pulumi.Int(1),
				AvailableMemory:  pulumi.String("256M"),
				TimeoutSeconds:   pulumi.Int(60),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
import com.pulumi.resources.CustomResourceOptions;

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()        
            .location("US")
            .uniformBucketLevelAccess(true)
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

        var object = new BucketObject("object", BucketObjectArgs.builder()        
            .bucket(bucket.name())
            .source(new FileAsset("path/to/index.zip"))
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

        var terraform_test2 = new Function("terraform-test2", FunctionArgs.builder()        
            .location("us-central1")
            .description("a new function")
            .buildConfig(FunctionBuildConfigArgs.builder()
                .runtime("nodejs16")
                .entryPoint("helloHttp")
                .source(FunctionBuildConfigSourceArgs.builder()
                    .storageSource(FunctionBuildConfigSourceStorageSourceArgs.builder()
                        .bucket(bucket.name())
                        .object(object.name())
                        .build())
                    .build())
                .build())
            .serviceConfig(FunctionServiceConfigArgs.builder()
                .maxInstanceCount(1)
                .availableMemory("256M")
                .timeoutSeconds(60)
                .build())
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

    }
}
import pulumi
import pulumi_gcp as gcp

# [START functions_v2_basic]
bucket = gcp.storage.Bucket("bucket",
    location="US",
    uniform_bucket_level_access=True,
    opts=pulumi.ResourceOptions(provider=google_beta))
object = gcp.storage.BucketObject("object",
    bucket=bucket.name,
    source=pulumi.FileAsset("path/to/index.zip"),
    opts=pulumi.ResourceOptions(provider=google_beta))
# Add path to the zipped function source code
terraform_test2 = gcp.cloudfunctionsv2.Function("terraform-test2",
    location="us-central1",
    description="a new function",
    build_config=gcp.cloudfunctionsv2.FunctionBuildConfigArgs(
        runtime="nodejs16",
        entry_point="helloHttp",
        source=gcp.cloudfunctionsv2.FunctionBuildConfigSourceArgs(
            storage_source=gcp.cloudfunctionsv2.FunctionBuildConfigSourceStorageSourceArgs(
                bucket=bucket.name,
                object=object.name,
            ),
        ),
    ),
    service_config=gcp.cloudfunctionsv2.FunctionServiceConfigArgs(
        max_instance_count=1,
        available_memory="256M",
        timeout_seconds=60,
    ),
    opts=pulumi.ResourceOptions(provider=google_beta))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

// [START functions_v2_basic]
const bucket = new gcp.storage.Bucket("bucket", {
    location: "US",
    uniformBucketLevelAccess: true,
}, {
    provider: google_beta,
});
const object = new gcp.storage.BucketObject("object", {
    bucket: bucket.name,
    source: new pulumi.asset.FileAsset("path/to/index.zip"),
}, {
    provider: google_beta,
});
// Add path to the zipped function source code
const terraform_test2 = new gcp.cloudfunctionsv2.Function("terraform-test2", {
    location: "us-central1",
    description: "a new function",
    buildConfig: {
        runtime: "nodejs16",
        entryPoint: "helloHttp",
        source: {
            storageSource: {
                bucket: bucket.name,
                object: object.name,
            },
        },
    },
    serviceConfig: {
        maxInstanceCount: 1,
        availableMemory: "256M",
        timeoutSeconds: 60,
    },
}, {
    provider: google_beta,
});
resources:
  bucket:
    type: gcp:storage:Bucket
    properties:
      location: US
      uniformBucketLevelAccess: true
    options:
      provider: ${["google-beta"]}
  object:
    type: gcp:storage:BucketObject
    properties:
      bucket: ${bucket.name}
      source:
        Fn::FileAsset: path/to/index.zip
    options:
      provider: ${["google-beta"]}
  terraform-test2:
    type: gcp:cloudfunctionsv2:Function
    properties:
      location: us-central1
      description: a new function
      buildConfig:
        runtime: nodejs16
        entryPoint: helloHttp
        source:
          storageSource:
            bucket: ${bucket.name}
            object: ${object.name}
      serviceConfig:
        maxInstanceCount: 1
        availableMemory: 256M
        timeoutSeconds: 60
    options:
      provider: ${["google-beta"]}

Cloudfunctions2 Full

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        // [START functions_v2_full]
        var account = new Gcp.ServiceAccount.Account("account", new Gcp.ServiceAccount.AccountArgs
        {
            AccountId = "s-a",
            DisplayName = "Test Service Account",
        }, new CustomResourceOptions
        {
            Provider = google_beta,
        });
        var sub = new Gcp.PubSub.Topic("sub", new Gcp.PubSub.TopicArgs
        {
        }, new CustomResourceOptions
        {
            Provider = google_beta,
        });
        var bucket = new Gcp.Storage.Bucket("bucket", new Gcp.Storage.BucketArgs
        {
            Location = "US",
            UniformBucketLevelAccess = true,
        }, new CustomResourceOptions
        {
            Provider = google_beta,
        });
        var @object = new Gcp.Storage.BucketObject("object", new Gcp.Storage.BucketObjectArgs
        {
            Bucket = bucket.Name,
            Source = new FileAsset("path/to/index.zip"),
        }, new CustomResourceOptions
        {
            Provider = google_beta,
        });
        // Add path to the zipped function source code
        var terraform_test = new Gcp.CloudFunctionsV2.Function("terraform-test", new Gcp.CloudFunctionsV2.FunctionArgs
        {
            Location = "us-central1",
            Description = "a new function",
            BuildConfig = new Gcp.CloudFunctionsV2.Inputs.FunctionBuildConfigArgs
            {
                Runtime = "nodejs16",
                EntryPoint = "helloPubSub",
                EnvironmentVariables = 
                {
                    { "BUILD_CONFIG_TEST", "build_test" },
                },
                Source = new Gcp.CloudFunctionsV2.Inputs.FunctionBuildConfigSourceArgs
                {
                    StorageSource = new Gcp.CloudFunctionsV2.Inputs.FunctionBuildConfigSourceStorageSourceArgs
                    {
                        Bucket = bucket.Name,
                        Object = @object.Name,
                    },
                },
            },
            ServiceConfig = new Gcp.CloudFunctionsV2.Inputs.FunctionServiceConfigArgs
            {
                MaxInstanceCount = 3,
                MinInstanceCount = 1,
                AvailableMemory = "256M",
                TimeoutSeconds = 60,
                EnvironmentVariables = 
                {
                    { "SERVICE_CONFIG_TEST", "config_test" },
                },
                IngressSettings = "ALLOW_INTERNAL_ONLY",
                AllTrafficOnLatestRevision = true,
                ServiceAccountEmail = account.Email,
            },
            EventTrigger = new Gcp.CloudFunctionsV2.Inputs.FunctionEventTriggerArgs
            {
                TriggerRegion = "us-central1",
                EventType = "google.cloud.pubsub.topic.v1.messagePublished",
                PubsubTopic = sub.Id,
                RetryPolicy = "RETRY_POLICY_RETRY",
                ServiceAccountEmail = account.Email,
            },
        }, new CustomResourceOptions
        {
            Provider = google_beta,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/cloudfunctionsv2"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/pubsub"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/serviceAccount"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		account, err := serviceAccount.NewAccount(ctx, "account", &serviceAccount.AccountArgs{
			AccountId:   pulumi.String("s-a"),
			DisplayName: pulumi.String("Test Service Account"),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		sub, err := pubsub.NewTopic(ctx, "sub", nil, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
			Location:                 pulumi.String("US"),
			UniformBucketLevelAccess: pulumi.Bool(true),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		object, err := storage.NewBucketObject(ctx, "object", &storage.BucketObjectArgs{
			Bucket: bucket.Name,
			Source: pulumi.NewFileAsset("path/to/index.zip"),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = cloudfunctionsv2.NewFunction(ctx, "terraform-test", &cloudfunctionsv2.FunctionArgs{
			Location:    pulumi.String("us-central1"),
			Description: pulumi.String("a new function"),
			BuildConfig: &cloudfunctionsv2.FunctionBuildConfigArgs{
				Runtime:    pulumi.String("nodejs16"),
				EntryPoint: pulumi.String("helloPubSub"),
				EnvironmentVariables: pulumi.StringMap{
					"BUILD_CONFIG_TEST": pulumi.String("build_test"),
				},
				Source: &cloudfunctionsv2.FunctionBuildConfigSourceArgs{
					StorageSource: &cloudfunctionsv2.FunctionBuildConfigSourceStorageSourceArgs{
						Bucket: bucket.Name,
						Object: object.Name,
					},
				},
			},
			ServiceConfig: &cloudfunctionsv2.FunctionServiceConfigArgs{
				MaxInstanceCount: pulumi.Int(3),
				MinInstanceCount: pulumi.Int(1),
				AvailableMemory:  pulumi.String("256M"),
				TimeoutSeconds:   pulumi.Int(60),
				EnvironmentVariables: pulumi.StringMap{
					"SERVICE_CONFIG_TEST": pulumi.String("config_test"),
				},
				IngressSettings:            pulumi.String("ALLOW_INTERNAL_ONLY"),
				AllTrafficOnLatestRevision: pulumi.Bool(true),
				ServiceAccountEmail:        account.Email,
			},
			EventTrigger: &cloudfunctionsv2.FunctionEventTriggerArgs{
				TriggerRegion:       pulumi.String("us-central1"),
				EventType:           pulumi.String("google.cloud.pubsub.topic.v1.messagePublished"),
				PubsubTopic:         sub.ID(),
				RetryPolicy:         pulumi.String("RETRY_POLICY_RETRY"),
				ServiceAccountEmail: account.Email,
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
import com.pulumi.resources.CustomResourceOptions;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var account = new Account("account", AccountArgs.builder()        
            .accountId("s-a")
            .displayName("Test Service Account")
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

        var sub = new Topic("sub", TopicArgs.Empty, CustomResourceOptions.builder()
            .provider(google_beta)
            .build());

        var bucket = new Bucket("bucket", BucketArgs.builder()        
            .location("US")
            .uniformBucketLevelAccess(true)
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

        var object = new BucketObject("object", BucketObjectArgs.builder()        
            .bucket(bucket.name())
            .source(new FileAsset("path/to/index.zip"))
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

        var terraform_test = new Function("terraform-test", FunctionArgs.builder()        
            .location("us-central1")
            .description("a new function")
            .buildConfig(FunctionBuildConfigArgs.builder()
                .runtime("nodejs16")
                .entryPoint("helloPubSub")
                .environmentVariables(Map.of("BUILD_CONFIG_TEST", "build_test"))
                .source(FunctionBuildConfigSourceArgs.builder()
                    .storageSource(FunctionBuildConfigSourceStorageSourceArgs.builder()
                        .bucket(bucket.name())
                        .object(object.name())
                        .build())
                    .build())
                .build())
            .serviceConfig(FunctionServiceConfigArgs.builder()
                .maxInstanceCount(3)
                .minInstanceCount(1)
                .availableMemory("256M")
                .timeoutSeconds(60)
                .environmentVariables(Map.of("SERVICE_CONFIG_TEST", "config_test"))
                .ingressSettings("ALLOW_INTERNAL_ONLY")
                .allTrafficOnLatestRevision(true)
                .serviceAccountEmail(account.email())
                .build())
            .eventTrigger(FunctionEventTriggerArgs.builder()
                .triggerRegion("us-central1")
                .eventType("google.cloud.pubsub.topic.v1.messagePublished")
                .pubsubTopic(sub.id())
                .retryPolicy("RETRY_POLICY_RETRY")
                .serviceAccountEmail(account.email())
                .build())
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

    }
}
import pulumi
import pulumi_gcp as gcp

# [START functions_v2_full]
account = gcp.service_account.Account("account",
    account_id="s-a",
    display_name="Test Service Account",
    opts=pulumi.ResourceOptions(provider=google_beta))
sub = gcp.pubsub.Topic("sub", opts=pulumi.ResourceOptions(provider=google_beta))
bucket = gcp.storage.Bucket("bucket",
    location="US",
    uniform_bucket_level_access=True,
    opts=pulumi.ResourceOptions(provider=google_beta))
object = gcp.storage.BucketObject("object",
    bucket=bucket.name,
    source=pulumi.FileAsset("path/to/index.zip"),
    opts=pulumi.ResourceOptions(provider=google_beta))
# Add path to the zipped function source code
terraform_test = gcp.cloudfunctionsv2.Function("terraform-test",
    location="us-central1",
    description="a new function",
    build_config=gcp.cloudfunctionsv2.FunctionBuildConfigArgs(
        runtime="nodejs16",
        entry_point="helloPubSub",
        environment_variables={
            "BUILD_CONFIG_TEST": "build_test",
        },
        source=gcp.cloudfunctionsv2.FunctionBuildConfigSourceArgs(
            storage_source=gcp.cloudfunctionsv2.FunctionBuildConfigSourceStorageSourceArgs(
                bucket=bucket.name,
                object=object.name,
            ),
        ),
    ),
    service_config=gcp.cloudfunctionsv2.FunctionServiceConfigArgs(
        max_instance_count=3,
        min_instance_count=1,
        available_memory="256M",
        timeout_seconds=60,
        environment_variables={
            "SERVICE_CONFIG_TEST": "config_test",
        },
        ingress_settings="ALLOW_INTERNAL_ONLY",
        all_traffic_on_latest_revision=True,
        service_account_email=account.email,
    ),
    event_trigger=gcp.cloudfunctionsv2.FunctionEventTriggerArgs(
        trigger_region="us-central1",
        event_type="google.cloud.pubsub.topic.v1.messagePublished",
        pubsub_topic=sub.id,
        retry_policy="RETRY_POLICY_RETRY",
        service_account_email=account.email,
    ),
    opts=pulumi.ResourceOptions(provider=google_beta))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

// [START functions_v2_full]
const account = new gcp.serviceaccount.Account("account", {
    accountId: "s-a",
    displayName: "Test Service Account",
}, {
    provider: google_beta,
});
const sub = new gcp.pubsub.Topic("sub", {}, {
    provider: google_beta,
});
const bucket = new gcp.storage.Bucket("bucket", {
    location: "US",
    uniformBucketLevelAccess: true,
}, {
    provider: google_beta,
});
const object = new gcp.storage.BucketObject("object", {
    bucket: bucket.name,
    source: new pulumi.asset.FileAsset("path/to/index.zip"),
}, {
    provider: google_beta,
});
// Add path to the zipped function source code
const terraform_test = new gcp.cloudfunctionsv2.Function("terraform-test", {
    location: "us-central1",
    description: "a new function",
    buildConfig: {
        runtime: "nodejs16",
        entryPoint: "helloPubSub",
        environmentVariables: {
            BUILD_CONFIG_TEST: "build_test",
        },
        source: {
            storageSource: {
                bucket: bucket.name,
                object: object.name,
            },
        },
    },
    serviceConfig: {
        maxInstanceCount: 3,
        minInstanceCount: 1,
        availableMemory: "256M",
        timeoutSeconds: 60,
        environmentVariables: {
            SERVICE_CONFIG_TEST: "config_test",
        },
        ingressSettings: "ALLOW_INTERNAL_ONLY",
        allTrafficOnLatestRevision: true,
        serviceAccountEmail: account.email,
    },
    eventTrigger: {
        triggerRegion: "us-central1",
        eventType: "google.cloud.pubsub.topic.v1.messagePublished",
        pubsubTopic: sub.id,
        retryPolicy: "RETRY_POLICY_RETRY",
        serviceAccountEmail: account.email,
    },
}, {
    provider: google_beta,
});
resources:
  account:
    type: gcp:serviceAccount:Account
    properties:
      accountId: s-a
      displayName: Test Service Account
    options:
      provider: ${["google-beta"]}
  sub:
    type: gcp:pubsub:Topic
    options:
      provider: ${["google-beta"]}
  bucket:
    type: gcp:storage:Bucket
    properties:
      location: US
      uniformBucketLevelAccess: true
    options:
      provider: ${["google-beta"]}
  object:
    type: gcp:storage:BucketObject
    properties:
      bucket: ${bucket.name}
      source:
        Fn::FileAsset: path/to/index.zip
    options:
      provider: ${["google-beta"]}
  terraform-test:
    type: gcp:cloudfunctionsv2:Function
    properties:
      location: us-central1
      description: a new function
      buildConfig:
        runtime: nodejs16
        entryPoint: helloPubSub
        environmentVariables:
          BUILD_CONFIG_TEST: build_test
        source:
          storageSource:
            bucket: ${bucket.name}
            object: ${object.name}
      serviceConfig:
        maxInstanceCount: 3
        minInstanceCount: 1
        availableMemory: 256M
        timeoutSeconds: 60
        environmentVariables:
          SERVICE_CONFIG_TEST: config_test
        ingressSettings: ALLOW_INTERNAL_ONLY
        allTrafficOnLatestRevision: true
        serviceAccountEmail: ${account.email}
      eventTrigger:
        triggerRegion: us-central1
        eventType: google.cloud.pubsub.topic.v1.messagePublished
        pubsubTopic: ${sub.id}
        retryPolicy: RETRY_POLICY_RETRY
        serviceAccountEmail: ${account.email}
    options:
      provider: ${["google-beta"]}

Create a Function Resource

new Function(name: string, args?: FunctionArgs, opts?: CustomResourceOptions);
@overload
def Function(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             build_config: Optional[FunctionBuildConfigArgs] = None,
             description: Optional[str] = None,
             event_trigger: Optional[FunctionEventTriggerArgs] = None,
             labels: Optional[Mapping[str, str]] = None,
             location: Optional[str] = None,
             name: Optional[str] = None,
             project: Optional[str] = None,
             service_config: Optional[FunctionServiceConfigArgs] = None)
@overload
def Function(resource_name: str,
             args: Optional[FunctionArgs] = None,
             opts: Optional[ResourceOptions] = None)
func NewFunction(ctx *Context, name string, args *FunctionArgs, opts ...ResourceOption) (*Function, error)
public Function(string name, FunctionArgs? args = null, CustomResourceOptions? opts = null)
public Function(String name, FunctionArgs args)
public Function(String name, FunctionArgs args, CustomResourceOptions options)
type: gcp:cloudfunctionsv2:Function
properties: # The arguments to resource properties.
options: # 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.
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.

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:

BuildConfig FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

Description string

User-provided description of a function.

EventTrigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

Labels Dictionary<string, string>

A set of key/value label pairs associated with this Cloud Function.

Location string

The location of this cloud function.

Name string

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

ServiceConfig FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

BuildConfig FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

Description string

User-provided description of a function.

EventTrigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

Labels map[string]string

A set of key/value label pairs associated with this Cloud Function.

Location string

The location of this cloud function.

Name string

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

ServiceConfig FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

buildConfig FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

description String

User-provided description of a function.

eventTrigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

labels Map<String,String>

A set of key/value label pairs associated with this Cloud Function.

location String

The location of this cloud function.

name String

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

serviceConfig FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

buildConfig FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

description string

User-provided description of a function.

eventTrigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

labels {[key: string]: string}

A set of key/value label pairs associated with this Cloud Function.

location string

The location of this cloud function.

name string

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

serviceConfig FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

build_config FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

description str

User-provided description of a function.

event_trigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

labels Mapping[str, str]

A set of key/value label pairs associated with this Cloud Function.

location str

The location of this cloud function.

name str

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

service_config FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

buildConfig Property Map

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

description String

User-provided description of a function.

eventTrigger Property Map

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

labels Map<String>

A set of key/value label pairs associated with this Cloud Function.

location String

The location of this cloud function.

name String

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

serviceConfig Property Map

Describes the Service being deployed. Structure is documented below.

Outputs

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

Environment string

The environment the function is hosted on.

Id string

The provider-assigned unique ID for this managed resource.

State string

Describes the current state of the function.

UpdateTime string

The last update timestamp of a Cloud Function.

Environment string

The environment the function is hosted on.

Id string

The provider-assigned unique ID for this managed resource.

State string

Describes the current state of the function.

UpdateTime string

The last update timestamp of a Cloud Function.

environment String

The environment the function is hosted on.

id String

The provider-assigned unique ID for this managed resource.

state String

Describes the current state of the function.

updateTime String

The last update timestamp of a Cloud Function.

environment string

The environment the function is hosted on.

id string

The provider-assigned unique ID for this managed resource.

state string

Describes the current state of the function.

updateTime string

The last update timestamp of a Cloud Function.

environment str

The environment the function is hosted on.

id str

The provider-assigned unique ID for this managed resource.

state str

Describes the current state of the function.

update_time str

The last update timestamp of a Cloud Function.

environment String

The environment the function is hosted on.

id String

The provider-assigned unique ID for this managed resource.

state String

Describes the current state of the function.

updateTime String

The last update timestamp of a Cloud Function.

Look up an 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,
        build_config: Optional[FunctionBuildConfigArgs] = None,
        description: Optional[str] = None,
        environment: Optional[str] = None,
        event_trigger: Optional[FunctionEventTriggerArgs] = None,
        labels: Optional[Mapping[str, str]] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        service_config: Optional[FunctionServiceConfigArgs] = None,
        state: Optional[str] = None,
        update_time: 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:
BuildConfig FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

Description string

User-provided description of a function.

Environment string

The environment the function is hosted on.

EventTrigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

Labels Dictionary<string, string>

A set of key/value label pairs associated with this Cloud Function.

Location string

The location of this cloud function.

Name string

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

ServiceConfig FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

State string

Describes the current state of the function.

UpdateTime string

The last update timestamp of a Cloud Function.

BuildConfig FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

Description string

User-provided description of a function.

Environment string

The environment the function is hosted on.

EventTrigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

Labels map[string]string

A set of key/value label pairs associated with this Cloud Function.

Location string

The location of this cloud function.

Name string

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

ServiceConfig FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

State string

Describes the current state of the function.

UpdateTime string

The last update timestamp of a Cloud Function.

buildConfig FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

description String

User-provided description of a function.

environment String

The environment the function is hosted on.

eventTrigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

labels Map<String,String>

A set of key/value label pairs associated with this Cloud Function.

location String

The location of this cloud function.

name String

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

serviceConfig FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

state String

Describes the current state of the function.

updateTime String

The last update timestamp of a Cloud Function.

buildConfig FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

description string

User-provided description of a function.

environment string

The environment the function is hosted on.

eventTrigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

labels {[key: string]: string}

A set of key/value label pairs associated with this Cloud Function.

location string

The location of this cloud function.

name string

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

serviceConfig FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

state string

Describes the current state of the function.

updateTime string

The last update timestamp of a Cloud Function.

build_config FunctionBuildConfigArgs

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

description str

User-provided description of a function.

environment str

The environment the function is hosted on.

event_trigger FunctionEventTriggerArgs

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

labels Mapping[str, str]

A set of key/value label pairs associated with this Cloud Function.

location str

The location of this cloud function.

name str

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

service_config FunctionServiceConfigArgs

Describes the Service being deployed. Structure is documented below.

state str

Describes the current state of the function.

update_time str

The last update timestamp of a Cloud Function.

buildConfig Property Map

Describes the Build step of the function that builds a container from the given source. Structure is documented below.

description String

User-provided description of a function.

environment String

The environment the function is hosted on.

eventTrigger Property Map

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. Structure is documented below.

labels Map<String>

A set of key/value label pairs associated with this Cloud Function.

location String

The location of this cloud function.

name String

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

serviceConfig Property Map

Describes the Service being deployed. Structure is documented below.

state String

Describes the current state of the function.

updateTime String

The last update timestamp of a Cloud Function.

Supporting Types

FunctionBuildConfig

Build string

The Cloud Build name of the latest successful deployment of the function.

DockerRepository string

User managed repository created in Artifact Registry optionally with a customer managed encryption key.

EntryPoint string

The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in source_location.

EnvironmentVariables Dictionary<string, string>

Environment variables that shall be available during function execution.

Runtime string

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function.

Source FunctionBuildConfigSource

The location of the function source code. Structure is documented below.

WorkerPool string

Name of the Cloud Build Custom Worker Pool that should be used to build the function.

Build string

The Cloud Build name of the latest successful deployment of the function.

DockerRepository string

User managed repository created in Artifact Registry optionally with a customer managed encryption key.

EntryPoint string

The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in source_location.

EnvironmentVariables map[string]string

Environment variables that shall be available during function execution.

Runtime string

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function.

Source FunctionBuildConfigSource

The location of the function source code. Structure is documented below.

WorkerPool string

Name of the Cloud Build Custom Worker Pool that should be used to build the function.

build String

The Cloud Build name of the latest successful deployment of the function.

dockerRepository String

User managed repository created in Artifact Registry optionally with a customer managed encryption key.

entryPoint String

The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in source_location.

environmentVariables Map<String,String>

Environment variables that shall be available during function execution.

runtime String

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function.

source FunctionBuildConfigSource

The location of the function source code. Structure is documented below.

workerPool String

Name of the Cloud Build Custom Worker Pool that should be used to build the function.

build string

The Cloud Build name of the latest successful deployment of the function.

dockerRepository string

User managed repository created in Artifact Registry optionally with a customer managed encryption key.

entryPoint string

The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in source_location.

environmentVariables {[key: string]: string}

Environment variables that shall be available during function execution.

runtime string

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function.

source FunctionBuildConfigSource

The location of the function source code. Structure is documented below.

workerPool string

Name of the Cloud Build Custom Worker Pool that should be used to build the function.

build str

The Cloud Build name of the latest successful deployment of the function.

docker_repository str

User managed repository created in Artifact Registry optionally with a customer managed encryption key.

entry_point str

The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in source_location.

environment_variables Mapping[str, str]

Environment variables that shall be available during function execution.

runtime str

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function.

source FunctionBuildConfigSource

The location of the function source code. Structure is documented below.

worker_pool str

Name of the Cloud Build Custom Worker Pool that should be used to build the function.

build String

The Cloud Build name of the latest successful deployment of the function.

dockerRepository String

User managed repository created in Artifact Registry optionally with a customer managed encryption key.

entryPoint String

The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in source_location.

environmentVariables Map<String>

Environment variables that shall be available during function execution.

runtime String

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function.

source Property Map

The location of the function source code. Structure is documented below.

workerPool String

Name of the Cloud Build Custom Worker Pool that should be used to build the function.

FunctionBuildConfigSource

RepoSource FunctionBuildConfigSourceRepoSource

If provided, get the source from this location in a Cloud Source Repository. Structure is documented below.

StorageSource FunctionBuildConfigSourceStorageSource

If provided, get the source from this location in Google Cloud Storage. Structure is documented below.

RepoSource FunctionBuildConfigSourceRepoSource

If provided, get the source from this location in a Cloud Source Repository. Structure is documented below.

StorageSource FunctionBuildConfigSourceStorageSource

If provided, get the source from this location in Google Cloud Storage. Structure is documented below.

repoSource FunctionBuildConfigSourceRepoSource

If provided, get the source from this location in a Cloud Source Repository. Structure is documented below.

storageSource FunctionBuildConfigSourceStorageSource

If provided, get the source from this location in Google Cloud Storage. Structure is documented below.

repoSource FunctionBuildConfigSourceRepoSource

If provided, get the source from this location in a Cloud Source Repository. Structure is documented below.

storageSource FunctionBuildConfigSourceStorageSource

If provided, get the source from this location in Google Cloud Storage. Structure is documented below.

repo_source FunctionBuildConfigSourceRepoSource

If provided, get the source from this location in a Cloud Source Repository. Structure is documented below.

storage_source FunctionBuildConfigSourceStorageSource

If provided, get the source from this location in Google Cloud Storage. Structure is documented below.

repoSource Property Map

If provided, get the source from this location in a Cloud Source Repository. Structure is documented below.

storageSource Property Map

If provided, get the source from this location in Google Cloud Storage. Structure is documented below.

FunctionBuildConfigSourceRepoSource

BranchName string

Regex matching branches to build.

CommitSha string

Regex matching tags to build.

Dir string

Directory, relative to the source root, in which to run the build.

InvertRegex bool

Only trigger a build if the revision regex does NOT match the revision regex.

ProjectId string

ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.

RepoName string

Name of the Cloud Source Repository.

TagName string

Regex matching tags to build.

BranchName string

Regex matching branches to build.

CommitSha string

Regex matching tags to build.

Dir string

Directory, relative to the source root, in which to run the build.

InvertRegex bool

Only trigger a build if the revision regex does NOT match the revision regex.

ProjectId string

ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.

RepoName string

Name of the Cloud Source Repository.

TagName string

Regex matching tags to build.

branchName String

Regex matching branches to build.

commitSha String

Regex matching tags to build.

dir String

Directory, relative to the source root, in which to run the build.

invertRegex Boolean

Only trigger a build if the revision regex does NOT match the revision regex.

projectId String

ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.

repoName String

Name of the Cloud Source Repository.

tagName String

Regex matching tags to build.

branchName string

Regex matching branches to build.

commitSha string

Regex matching tags to build.

dir string

Directory, relative to the source root, in which to run the build.

invertRegex boolean

Only trigger a build if the revision regex does NOT match the revision regex.

projectId string

ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.

repoName string

Name of the Cloud Source Repository.

tagName string

Regex matching tags to build.

branch_name str

Regex matching branches to build.

commit_sha str

Regex matching tags to build.

dir str

Directory, relative to the source root, in which to run the build.

invert_regex bool

Only trigger a build if the revision regex does NOT match the revision regex.

project_id str

ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.

repo_name str

Name of the Cloud Source Repository.

tag_name str

Regex matching tags to build.

branchName String

Regex matching branches to build.

commitSha String

Regex matching tags to build.

dir String

Directory, relative to the source root, in which to run the build.

invertRegex Boolean

Only trigger a build if the revision regex does NOT match the revision regex.

projectId String

ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.

repoName String

Name of the Cloud Source Repository.

tagName String

Regex matching tags to build.

FunctionBuildConfigSourceStorageSource

Bucket string

Google Cloud Storage bucket containing the source

Generation int

Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.

Object string

Google Cloud Storage object containing the source.

Bucket string

Google Cloud Storage bucket containing the source

Generation int

Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.

Object string

Google Cloud Storage object containing the source.

bucket String

Google Cloud Storage bucket containing the source

generation Integer

Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.

object String

Google Cloud Storage object containing the source.

bucket string

Google Cloud Storage bucket containing the source

generation number

Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.

object string

Google Cloud Storage object containing the source.

bucket str

Google Cloud Storage bucket containing the source

generation int

Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.

object str

Google Cloud Storage object containing the source.

bucket String

Google Cloud Storage bucket containing the source

generation Number

Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.

object String

Google Cloud Storage object containing the source.

FunctionEventTrigger

EventType string

Required. The type of event to observe.

PubsubTopic string

The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery.

RetryPolicy string

Describes the retry policy in case of function's execution failure. Retried execution is charged as any other execution. Possible values are RETRY_POLICY_UNSPECIFIED, RETRY_POLICY_DO_NOT_RETRY, and RETRY_POLICY_RETRY.

ServiceAccountEmail string

The email of the service account for this function.

Trigger string

The resource name of the Eventarc trigger.

TriggerRegion string

The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function.

EventType string

Required. The type of event to observe.

PubsubTopic string

The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery.

RetryPolicy string

Describes the retry policy in case of function's execution failure. Retried execution is charged as any other execution. Possible values are RETRY_POLICY_UNSPECIFIED, RETRY_POLICY_DO_NOT_RETRY, and RETRY_POLICY_RETRY.

ServiceAccountEmail string

The email of the service account for this function.

Trigger string

The resource name of the Eventarc trigger.

TriggerRegion string

The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function.

eventType String

Required. The type of event to observe.

pubsubTopic String

The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery.

retryPolicy String

Describes the retry policy in case of function's execution failure. Retried execution is charged as any other execution. Possible values are RETRY_POLICY_UNSPECIFIED, RETRY_POLICY_DO_NOT_RETRY, and RETRY_POLICY_RETRY.

serviceAccountEmail String

The email of the service account for this function.

trigger String

The resource name of the Eventarc trigger.

triggerRegion String

The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function.

eventType string

Required. The type of event to observe.

pubsubTopic string

The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery.

retryPolicy string

Describes the retry policy in case of function's execution failure. Retried execution is charged as any other execution. Possible values are RETRY_POLICY_UNSPECIFIED, RETRY_POLICY_DO_NOT_RETRY, and RETRY_POLICY_RETRY.

serviceAccountEmail string

The email of the service account for this function.

trigger string

The resource name of the Eventarc trigger.

triggerRegion string

The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function.

event_type str

Required. The type of event to observe.

pubsub_topic str

The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery.

retry_policy str

Describes the retry policy in case of function's execution failure. Retried execution is charged as any other execution. Possible values are RETRY_POLICY_UNSPECIFIED, RETRY_POLICY_DO_NOT_RETRY, and RETRY_POLICY_RETRY.

service_account_email str

The email of the service account for this function.

trigger str

The resource name of the Eventarc trigger.

trigger_region str

The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function.

eventType String

Required. The type of event to observe.

pubsubTopic String

The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery.

retryPolicy String

Describes the retry policy in case of function's execution failure. Retried execution is charged as any other execution. Possible values are RETRY_POLICY_UNSPECIFIED, RETRY_POLICY_DO_NOT_RETRY, and RETRY_POLICY_RETRY.

serviceAccountEmail String

The email of the service account for this function.

trigger String

The resource name of the Eventarc trigger.

triggerRegion String

The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function.

FunctionServiceConfig

AllTrafficOnLatestRevision bool

Whether 100% of traffic is routed to the latest revision. Defaults to true.

AvailableMemory string

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes.

EnvironmentVariables Dictionary<string, string>

Environment variables that shall be available during function execution.

GcfUri string

URIs of the Service deployed

IngressSettings string

Available ingress settings. Defaults to "ALLOW_ALL" if unspecified. Default value is ALLOW_ALL. Possible values are ALLOW_ALL, ALLOW_INTERNAL_ONLY, and ALLOW_INTERNAL_AND_GCLB.

MaxInstanceCount int

The limit on the maximum number of function instances that may coexist at a given time.

MinInstanceCount int

The limit on the minimum number of function instances that may coexist at a given time.

Service string

Name of the service associated with a Function.

ServiceAccountEmail string

The email of the service account for this function.

TimeoutSeconds int

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

Uri string

URI of the Service deployed.

VpcConnector string

The Serverless VPC Access connector that this cloud function can connect to.

VpcConnectorEgressSettings string

Available egress settings. Possible values are VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED, PRIVATE_RANGES_ONLY, and ALL_TRAFFIC.

AllTrafficOnLatestRevision bool

Whether 100% of traffic is routed to the latest revision. Defaults to true.

AvailableMemory string

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes.

EnvironmentVariables map[string]string

Environment variables that shall be available during function execution.

GcfUri string

URIs of the Service deployed

IngressSettings string

Available ingress settings. Defaults to "ALLOW_ALL" if unspecified. Default value is ALLOW_ALL. Possible values are ALLOW_ALL, ALLOW_INTERNAL_ONLY, and ALLOW_INTERNAL_AND_GCLB.

MaxInstanceCount int

The limit on the maximum number of function instances that may coexist at a given time.

MinInstanceCount int

The limit on the minimum number of function instances that may coexist at a given time.

Service string

Name of the service associated with a Function.

ServiceAccountEmail string

The email of the service account for this function.

TimeoutSeconds int

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

Uri string

URI of the Service deployed.

VpcConnector string

The Serverless VPC Access connector that this cloud function can connect to.

VpcConnectorEgressSettings string

Available egress settings. Possible values are VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED, PRIVATE_RANGES_ONLY, and ALL_TRAFFIC.

allTrafficOnLatestRevision Boolean

Whether 100% of traffic is routed to the latest revision. Defaults to true.

availableMemory String

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes.

environmentVariables Map<String,String>

Environment variables that shall be available during function execution.

gcfUri String

URIs of the Service deployed

ingressSettings String

Available ingress settings. Defaults to "ALLOW_ALL" if unspecified. Default value is ALLOW_ALL. Possible values are ALLOW_ALL, ALLOW_INTERNAL_ONLY, and ALLOW_INTERNAL_AND_GCLB.

maxInstanceCount Integer

The limit on the maximum number of function instances that may coexist at a given time.

minInstanceCount Integer

The limit on the minimum number of function instances that may coexist at a given time.

service String

Name of the service associated with a Function.

serviceAccountEmail String

The email of the service account for this function.

timeoutSeconds Integer

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

uri String

URI of the Service deployed.

vpcConnector String

The Serverless VPC Access connector that this cloud function can connect to.

vpcConnectorEgressSettings String

Available egress settings. Possible values are VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED, PRIVATE_RANGES_ONLY, and ALL_TRAFFIC.

allTrafficOnLatestRevision boolean

Whether 100% of traffic is routed to the latest revision. Defaults to true.

availableMemory string

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes.

environmentVariables {[key: string]: string}

Environment variables that shall be available during function execution.

gcfUri string

URIs of the Service deployed

ingressSettings string

Available ingress settings. Defaults to "ALLOW_ALL" if unspecified. Default value is ALLOW_ALL. Possible values are ALLOW_ALL, ALLOW_INTERNAL_ONLY, and ALLOW_INTERNAL_AND_GCLB.

maxInstanceCount number

The limit on the maximum number of function instances that may coexist at a given time.

minInstanceCount number

The limit on the minimum number of function instances that may coexist at a given time.

service string

Name of the service associated with a Function.

serviceAccountEmail string

The email of the service account for this function.

timeoutSeconds number

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

uri string

URI of the Service deployed.

vpcConnector string

The Serverless VPC Access connector that this cloud function can connect to.

vpcConnectorEgressSettings string

Available egress settings. Possible values are VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED, PRIVATE_RANGES_ONLY, and ALL_TRAFFIC.

all_traffic_on_latest_revision bool

Whether 100% of traffic is routed to the latest revision. Defaults to true.

available_memory str

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes.

environment_variables Mapping[str, str]

Environment variables that shall be available during function execution.

gcf_uri str

URIs of the Service deployed

ingress_settings str

Available ingress settings. Defaults to "ALLOW_ALL" if unspecified. Default value is ALLOW_ALL. Possible values are ALLOW_ALL, ALLOW_INTERNAL_ONLY, and ALLOW_INTERNAL_AND_GCLB.

max_instance_count int

The limit on the maximum number of function instances that may coexist at a given time.

min_instance_count int

The limit on the minimum number of function instances that may coexist at a given time.

service str

Name of the service associated with a Function.

service_account_email str

The email of the service account for this function.

timeout_seconds int

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

uri str

URI of the Service deployed.

vpc_connector str

The Serverless VPC Access connector that this cloud function can connect to.

vpc_connector_egress_settings str

Available egress settings. Possible values are VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED, PRIVATE_RANGES_ONLY, and ALL_TRAFFIC.

allTrafficOnLatestRevision Boolean

Whether 100% of traffic is routed to the latest revision. Defaults to true.

availableMemory String

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes.

environmentVariables Map<String>

Environment variables that shall be available during function execution.

gcfUri String

URIs of the Service deployed

ingressSettings String

Available ingress settings. Defaults to "ALLOW_ALL" if unspecified. Default value is ALLOW_ALL. Possible values are ALLOW_ALL, ALLOW_INTERNAL_ONLY, and ALLOW_INTERNAL_AND_GCLB.

maxInstanceCount Number

The limit on the maximum number of function instances that may coexist at a given time.

minInstanceCount Number

The limit on the minimum number of function instances that may coexist at a given time.

service String

Name of the service associated with a Function.

serviceAccountEmail String

The email of the service account for this function.

timeoutSeconds Number

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

uri String

URI of the Service deployed.

vpcConnector String

The Serverless VPC Access connector that this cloud function can connect to.

vpcConnectorEgressSettings String

Available egress settings. Possible values are VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED, PRIVATE_RANGES_ONLY, and ALL_TRAFFIC.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.