gcp.eventarc.Trigger
Explore with Pulumi AI
The Eventarc Trigger resource
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.cloudrun.Service("default", {
name: "eventarc-service",
location: "europe-west1",
metadata: {
namespace: "my-project-name",
},
template: {
spec: {
containers: [{
image: "gcr.io/cloudrun/hello",
ports: [{
containerPort: 8080,
}],
}],
containerConcurrency: 50,
timeoutSeconds: 100,
},
},
traffics: [{
percent: 100,
latestRevision: true,
}],
});
const primary = new gcp.eventarc.Trigger("primary", {
name: "name",
location: "europe-west1",
matchingCriterias: [{
attribute: "type",
value: "google.cloud.pubsub.topic.v1.messagePublished",
}],
destination: {
cloudRunService: {
service: _default.name,
region: "europe-west1",
},
},
labels: {
foo: "bar",
},
});
const foo = new gcp.pubsub.Topic("foo", {name: "topic"});
import pulumi
import pulumi_gcp as gcp
default = gcp.cloudrun.Service("default",
name="eventarc-service",
location="europe-west1",
metadata={
"namespace": "my-project-name",
},
template={
"spec": {
"containers": [{
"image": "gcr.io/cloudrun/hello",
"ports": [{
"container_port": 8080,
}],
}],
"container_concurrency": 50,
"timeout_seconds": 100,
},
},
traffics=[{
"percent": 100,
"latest_revision": True,
}])
primary = gcp.eventarc.Trigger("primary",
name="name",
location="europe-west1",
matching_criterias=[{
"attribute": "type",
"value": "google.cloud.pubsub.topic.v1.messagePublished",
}],
destination={
"cloud_run_service": {
"service": default.name,
"region": "europe-west1",
},
},
labels={
"foo": "bar",
})
foo = gcp.pubsub.Topic("foo", name="topic")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrun"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/eventarc"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/pubsub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudrun.NewService(ctx, "default", &cloudrun.ServiceArgs{
Name: pulumi.String("eventarc-service"),
Location: pulumi.String("europe-west1"),
Metadata: &cloudrun.ServiceMetadataArgs{
Namespace: pulumi.String("my-project-name"),
},
Template: &cloudrun.ServiceTemplateArgs{
Spec: &cloudrun.ServiceTemplateSpecArgs{
Containers: cloudrun.ServiceTemplateSpecContainerArray{
&cloudrun.ServiceTemplateSpecContainerArgs{
Image: pulumi.String("gcr.io/cloudrun/hello"),
Ports: cloudrun.ServiceTemplateSpecContainerPortArray{
&cloudrun.ServiceTemplateSpecContainerPortArgs{
ContainerPort: pulumi.Int(8080),
},
},
},
},
ContainerConcurrency: pulumi.Int(50),
TimeoutSeconds: pulumi.Int(100),
},
},
Traffics: cloudrun.ServiceTrafficArray{
&cloudrun.ServiceTrafficArgs{
Percent: pulumi.Int(100),
LatestRevision: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
_, err = eventarc.NewTrigger(ctx, "primary", &eventarc.TriggerArgs{
Name: pulumi.String("name"),
Location: pulumi.String("europe-west1"),
MatchingCriterias: eventarc.TriggerMatchingCriteriaArray{
&eventarc.TriggerMatchingCriteriaArgs{
Attribute: pulumi.String("type"),
Value: pulumi.String("google.cloud.pubsub.topic.v1.messagePublished"),
},
},
Destination: &eventarc.TriggerDestinationArgs{
CloudRunService: &eventarc.TriggerDestinationCloudRunServiceArgs{
Service: _default.Name,
Region: pulumi.String("europe-west1"),
},
},
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
_, err = pubsub.NewTopic(ctx, "foo", &pubsub.TopicArgs{
Name: pulumi.String("topic"),
})
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 @default = new Gcp.CloudRun.Service("default", new()
{
Name = "eventarc-service",
Location = "europe-west1",
Metadata = new Gcp.CloudRun.Inputs.ServiceMetadataArgs
{
Namespace = "my-project-name",
},
Template = new Gcp.CloudRun.Inputs.ServiceTemplateArgs
{
Spec = new Gcp.CloudRun.Inputs.ServiceTemplateSpecArgs
{
Containers = new[]
{
new Gcp.CloudRun.Inputs.ServiceTemplateSpecContainerArgs
{
Image = "gcr.io/cloudrun/hello",
Ports = new[]
{
new Gcp.CloudRun.Inputs.ServiceTemplateSpecContainerPortArgs
{
ContainerPort = 8080,
},
},
},
},
ContainerConcurrency = 50,
TimeoutSeconds = 100,
},
},
Traffics = new[]
{
new Gcp.CloudRun.Inputs.ServiceTrafficArgs
{
Percent = 100,
LatestRevision = true,
},
},
});
var primary = new Gcp.Eventarc.Trigger("primary", new()
{
Name = "name",
Location = "europe-west1",
MatchingCriterias = new[]
{
new Gcp.Eventarc.Inputs.TriggerMatchingCriteriaArgs
{
Attribute = "type",
Value = "google.cloud.pubsub.topic.v1.messagePublished",
},
},
Destination = new Gcp.Eventarc.Inputs.TriggerDestinationArgs
{
CloudRunService = new Gcp.Eventarc.Inputs.TriggerDestinationCloudRunServiceArgs
{
Service = @default.Name,
Region = "europe-west1",
},
},
Labels =
{
{ "foo", "bar" },
},
});
var foo = new Gcp.PubSub.Topic("foo", new()
{
Name = "topic",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudrun.Service;
import com.pulumi.gcp.cloudrun.ServiceArgs;
import com.pulumi.gcp.cloudrun.inputs.ServiceMetadataArgs;
import com.pulumi.gcp.cloudrun.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecArgs;
import com.pulumi.gcp.cloudrun.inputs.ServiceTrafficArgs;
import com.pulumi.gcp.eventarc.Trigger;
import com.pulumi.gcp.eventarc.TriggerArgs;
import com.pulumi.gcp.eventarc.inputs.TriggerMatchingCriteriaArgs;
import com.pulumi.gcp.eventarc.inputs.TriggerDestinationArgs;
import com.pulumi.gcp.eventarc.inputs.TriggerDestinationCloudRunServiceArgs;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new Service("default", ServiceArgs.builder()
.name("eventarc-service")
.location("europe-west1")
.metadata(ServiceMetadataArgs.builder()
.namespace("my-project-name")
.build())
.template(ServiceTemplateArgs.builder()
.spec(ServiceTemplateSpecArgs.builder()
.containers(ServiceTemplateSpecContainerArgs.builder()
.image("gcr.io/cloudrun/hello")
.ports(ServiceTemplateSpecContainerPortArgs.builder()
.containerPort(8080)
.build())
.build())
.containerConcurrency(50)
.timeoutSeconds(100)
.build())
.build())
.traffics(ServiceTrafficArgs.builder()
.percent(100)
.latestRevision(true)
.build())
.build());
var primary = new Trigger("primary", TriggerArgs.builder()
.name("name")
.location("europe-west1")
.matchingCriterias(TriggerMatchingCriteriaArgs.builder()
.attribute("type")
.value("google.cloud.pubsub.topic.v1.messagePublished")
.build())
.destination(TriggerDestinationArgs.builder()
.cloudRunService(TriggerDestinationCloudRunServiceArgs.builder()
.service(default_.name())
.region("europe-west1")
.build())
.build())
.labels(Map.of("foo", "bar"))
.build());
var foo = new Topic("foo", TopicArgs.builder()
.name("topic")
.build());
}
}
resources:
primary:
type: gcp:eventarc:Trigger
properties:
name: name
location: europe-west1
matchingCriterias:
- attribute: type
value: google.cloud.pubsub.topic.v1.messagePublished
destination:
cloudRunService:
service: ${default.name}
region: europe-west1
labels:
foo: bar
foo:
type: gcp:pubsub:Topic
properties:
name: topic
default:
type: gcp:cloudrun:Service
properties:
name: eventarc-service
location: europe-west1
metadata:
namespace: my-project-name
template:
spec:
containers:
- image: gcr.io/cloudrun/hello
ports:
- containerPort: 8080
containerConcurrency: 50
timeoutSeconds: 100
traffics:
- percent: 100
latestRevision: true
Create Trigger Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Trigger(name: string, args: TriggerArgs, opts?: CustomResourceOptions);
@overload
def Trigger(resource_name: str,
args: TriggerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Trigger(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination: Optional[TriggerDestinationArgs] = None,
location: Optional[str] = None,
matching_criterias: Optional[Sequence[TriggerMatchingCriteriaArgs]] = None,
channel: Optional[str] = None,
event_data_content_type: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
service_account: Optional[str] = None,
transport: Optional[TriggerTransportArgs] = None)
func NewTrigger(ctx *Context, name string, args TriggerArgs, opts ...ResourceOption) (*Trigger, error)
public Trigger(string name, TriggerArgs args, CustomResourceOptions? opts = null)
public Trigger(String name, TriggerArgs args)
public Trigger(String name, TriggerArgs args, CustomResourceOptions options)
type: gcp:eventarc:Trigger
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 TriggerArgs
- 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 TriggerArgs
- 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 TriggerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TriggerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var gcpTriggerResource = new Gcp.Eventarc.Trigger("gcpTriggerResource", new()
{
Destination = new Gcp.Eventarc.Inputs.TriggerDestinationArgs
{
CloudFunction = "string",
CloudRunService = new Gcp.Eventarc.Inputs.TriggerDestinationCloudRunServiceArgs
{
Service = "string",
Path = "string",
Region = "string",
},
Gke = new Gcp.Eventarc.Inputs.TriggerDestinationGkeArgs
{
Cluster = "string",
Location = "string",
Namespace = "string",
Service = "string",
Path = "string",
},
HttpEndpoint = new Gcp.Eventarc.Inputs.TriggerDestinationHttpEndpointArgs
{
Uri = "string",
},
NetworkConfig = new Gcp.Eventarc.Inputs.TriggerDestinationNetworkConfigArgs
{
NetworkAttachment = "string",
},
Workflow = "string",
},
Location = "string",
MatchingCriterias = new[]
{
new Gcp.Eventarc.Inputs.TriggerMatchingCriteriaArgs
{
Attribute = "string",
Value = "string",
Operator = "string",
},
},
Channel = "string",
EventDataContentType = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
Project = "string",
ServiceAccount = "string",
Transport = new Gcp.Eventarc.Inputs.TriggerTransportArgs
{
Pubsub = new Gcp.Eventarc.Inputs.TriggerTransportPubsubArgs
{
Subscription = "string",
Topic = "string",
},
},
});
example, err := eventarc.NewTrigger(ctx, "gcpTriggerResource", &eventarc.TriggerArgs{
Destination: &eventarc.TriggerDestinationArgs{
CloudFunction: pulumi.String("string"),
CloudRunService: &eventarc.TriggerDestinationCloudRunServiceArgs{
Service: pulumi.String("string"),
Path: pulumi.String("string"),
Region: pulumi.String("string"),
},
Gke: &eventarc.TriggerDestinationGkeArgs{
Cluster: pulumi.String("string"),
Location: pulumi.String("string"),
Namespace: pulumi.String("string"),
Service: pulumi.String("string"),
Path: pulumi.String("string"),
},
HttpEndpoint: &eventarc.TriggerDestinationHttpEndpointArgs{
Uri: pulumi.String("string"),
},
NetworkConfig: &eventarc.TriggerDestinationNetworkConfigArgs{
NetworkAttachment: pulumi.String("string"),
},
Workflow: pulumi.String("string"),
},
Location: pulumi.String("string"),
MatchingCriterias: eventarc.TriggerMatchingCriteriaArray{
&eventarc.TriggerMatchingCriteriaArgs{
Attribute: pulumi.String("string"),
Value: pulumi.String("string"),
Operator: pulumi.String("string"),
},
},
Channel: pulumi.String("string"),
EventDataContentType: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
ServiceAccount: pulumi.String("string"),
Transport: &eventarc.TriggerTransportArgs{
Pubsub: &eventarc.TriggerTransportPubsubArgs{
Subscription: pulumi.String("string"),
Topic: pulumi.String("string"),
},
},
})
var gcpTriggerResource = new Trigger("gcpTriggerResource", TriggerArgs.builder()
.destination(TriggerDestinationArgs.builder()
.cloudFunction("string")
.cloudRunService(TriggerDestinationCloudRunServiceArgs.builder()
.service("string")
.path("string")
.region("string")
.build())
.gke(TriggerDestinationGkeArgs.builder()
.cluster("string")
.location("string")
.namespace("string")
.service("string")
.path("string")
.build())
.httpEndpoint(TriggerDestinationHttpEndpointArgs.builder()
.uri("string")
.build())
.networkConfig(TriggerDestinationNetworkConfigArgs.builder()
.networkAttachment("string")
.build())
.workflow("string")
.build())
.location("string")
.matchingCriterias(TriggerMatchingCriteriaArgs.builder()
.attribute("string")
.value("string")
.operator("string")
.build())
.channel("string")
.eventDataContentType("string")
.labels(Map.of("string", "string"))
.name("string")
.project("string")
.serviceAccount("string")
.transport(TriggerTransportArgs.builder()
.pubsub(TriggerTransportPubsubArgs.builder()
.subscription("string")
.topic("string")
.build())
.build())
.build());
gcp_trigger_resource = gcp.eventarc.Trigger("gcpTriggerResource",
destination={
"cloudFunction": "string",
"cloudRunService": {
"service": "string",
"path": "string",
"region": "string",
},
"gke": {
"cluster": "string",
"location": "string",
"namespace": "string",
"service": "string",
"path": "string",
},
"httpEndpoint": {
"uri": "string",
},
"networkConfig": {
"networkAttachment": "string",
},
"workflow": "string",
},
location="string",
matching_criterias=[{
"attribute": "string",
"value": "string",
"operator": "string",
}],
channel="string",
event_data_content_type="string",
labels={
"string": "string",
},
name="string",
project="string",
service_account="string",
transport={
"pubsub": {
"subscription": "string",
"topic": "string",
},
})
const gcpTriggerResource = new gcp.eventarc.Trigger("gcpTriggerResource", {
destination: {
cloudFunction: "string",
cloudRunService: {
service: "string",
path: "string",
region: "string",
},
gke: {
cluster: "string",
location: "string",
namespace: "string",
service: "string",
path: "string",
},
httpEndpoint: {
uri: "string",
},
networkConfig: {
networkAttachment: "string",
},
workflow: "string",
},
location: "string",
matchingCriterias: [{
attribute: "string",
value: "string",
operator: "string",
}],
channel: "string",
eventDataContentType: "string",
labels: {
string: "string",
},
name: "string",
project: "string",
serviceAccount: "string",
transport: {
pubsub: {
subscription: "string",
topic: "string",
},
},
});
type: gcp:eventarc:Trigger
properties:
channel: string
destination:
cloudFunction: string
cloudRunService:
path: string
region: string
service: string
gke:
cluster: string
location: string
namespace: string
path: string
service: string
httpEndpoint:
uri: string
networkConfig:
networkAttachment: string
workflow: string
eventDataContentType: string
labels:
string: string
location: string
matchingCriterias:
- attribute: string
operator: string
value: string
name: string
project: string
serviceAccount: string
transport:
pubsub:
subscription: string
topic: string
Trigger 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 Trigger resource accepts the following input properties:
- Destination
Trigger
Destination - Required. Destination specifies where the events should be sent to.
- Location string
- The location for the resource
- Matching
Criterias List<TriggerMatching Criteria> - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- Channel string
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - Event
Data stringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - Labels Dictionary<string, string>
- Optional. User labels attached to the triggers that can be used to group resources. 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. - Name string
- Required. The resource name of the trigger. Must be unique within the location on the project.
- Project string
- The project for the resource
- Service
Account string - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - Transport
Trigger
Transport - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- Destination
Trigger
Destination Args - Required. Destination specifies where the events should be sent to.
- Location string
- The location for the resource
- Matching
Criterias []TriggerMatching Criteria Args - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- Channel string
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - Event
Data stringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - Labels map[string]string
- Optional. User labels attached to the triggers that can be used to group resources. 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. - Name string
- Required. The resource name of the trigger. Must be unique within the location on the project.
- Project string
- The project for the resource
- Service
Account string - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - Transport
Trigger
Transport Args - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- destination
Trigger
Destination - Required. Destination specifies where the events should be sent to.
- location String
- The location for the resource
- matching
Criterias List<TriggerMatching Criteria> - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- channel String
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - event
Data StringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - labels Map<String,String>
- Optional. User labels attached to the triggers that can be used to group resources. 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. - name String
- Required. The resource name of the trigger. Must be unique within the location on the project.
- project String
- The project for the resource
- service
Account String - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - transport
Trigger
Transport - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- destination
Trigger
Destination - Required. Destination specifies where the events should be sent to.
- location string
- The location for the resource
- matching
Criterias TriggerMatching Criteria[] - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- channel string
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - event
Data stringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - labels {[key: string]: string}
- Optional. User labels attached to the triggers that can be used to group resources. 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. - name string
- Required. The resource name of the trigger. Must be unique within the location on the project.
- project string
- The project for the resource
- service
Account string - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - transport
Trigger
Transport - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- destination
Trigger
Destination Args - Required. Destination specifies where the events should be sent to.
- location str
- The location for the resource
- matching_
criterias Sequence[TriggerMatching Criteria Args] - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- channel str
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - event_
data_ strcontent_ type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - labels Mapping[str, str]
- Optional. User labels attached to the triggers that can be used to group resources. 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. - name str
- Required. The resource name of the trigger. Must be unique within the location on the project.
- project str
- The project for the resource
- service_
account str - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - transport
Trigger
Transport Args - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- destination Property Map
- Required. Destination specifies where the events should be sent to.
- location String
- The location for the resource
- matching
Criterias List<Property Map> - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- channel String
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - event
Data StringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - labels Map<String>
- Optional. User labels attached to the triggers that can be used to group resources. 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. - name String
- Required. The resource name of the trigger. Must be unique within the location on the project.
- project String
- The project for the resource
- service
Account String - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - transport Property Map
- Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
Outputs
All input properties are implicitly available as output properties. Additionally, the Trigger resource produces the following output properties:
- Conditions Dictionary<string, string>
- Output only. The reason(s) why a trigger is in FAILED state.
- Create
Time string - Output only. The creation time.
- Effective
Labels 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.
- Etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Uid string
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- Update
Time string - Output only. The last-modified time.
- Conditions map[string]string
- Output only. The reason(s) why a trigger is in FAILED state.
- Create
Time string - Output only. The creation time.
- Effective
Labels 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.
- Etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Uid string
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- Update
Time string - Output only. The last-modified time.
- conditions Map<String,String>
- Output only. The reason(s) why a trigger is in FAILED state.
- create
Time String - Output only. The creation time.
- effective
Labels 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.
- etag String
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- uid String
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- update
Time String - Output only. The last-modified time.
- conditions {[key: string]: string}
- Output only. The reason(s) why a trigger is in FAILED state.
- create
Time string - Output only. The creation time.
- effective
Labels {[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.
- etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- uid string
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- update
Time string - Output only. The last-modified time.
- conditions Mapping[str, str]
- Output only. The reason(s) why a trigger is in FAILED state.
- create_
time str - Output only. The creation time.
- 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.
- etag str
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- 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.
- uid str
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- update_
time str - Output only. The last-modified time.
- conditions Map<String>
- Output only. The reason(s) why a trigger is in FAILED state.
- create
Time String - Output only. The creation time.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag String
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- uid String
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- update
Time String - Output only. The last-modified time.
Look up Existing Trigger Resource
Get an existing Trigger 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?: TriggerState, opts?: CustomResourceOptions): Trigger
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
channel: Optional[str] = None,
conditions: Optional[Mapping[str, str]] = None,
create_time: Optional[str] = None,
destination: Optional[TriggerDestinationArgs] = None,
effective_labels: Optional[Mapping[str, str]] = None,
etag: Optional[str] = None,
event_data_content_type: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
matching_criterias: Optional[Sequence[TriggerMatchingCriteriaArgs]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
service_account: Optional[str] = None,
transport: Optional[TriggerTransportArgs] = None,
uid: Optional[str] = None,
update_time: Optional[str] = None) -> Trigger
func GetTrigger(ctx *Context, name string, id IDInput, state *TriggerState, opts ...ResourceOption) (*Trigger, error)
public static Trigger Get(string name, Input<string> id, TriggerState? state, CustomResourceOptions? opts = null)
public static Trigger get(String name, Output<String> id, TriggerState 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.
- Channel string
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - Conditions Dictionary<string, string>
- Output only. The reason(s) why a trigger is in FAILED state.
- Create
Time string - Output only. The creation time.
- Destination
Trigger
Destination - Required. Destination specifies where the events should be sent to.
- Effective
Labels 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.
- Etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- Event
Data stringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - Labels Dictionary<string, string>
- Optional. User labels attached to the triggers that can be used to group resources. 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. - Location string
- The location for the resource
- Matching
Criterias List<TriggerMatching Criteria> - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- Name string
- Required. The resource name of the trigger. Must be unique within the location on the project.
- Project string
- The project for the resource
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Service
Account string - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - Transport
Trigger
Transport - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- Uid string
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- Update
Time string - Output only. The last-modified time.
- Channel string
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - Conditions map[string]string
- Output only. The reason(s) why a trigger is in FAILED state.
- Create
Time string - Output only. The creation time.
- Destination
Trigger
Destination Args - Required. Destination specifies where the events should be sent to.
- Effective
Labels 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.
- Etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- Event
Data stringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - Labels map[string]string
- Optional. User labels attached to the triggers that can be used to group resources. 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. - Location string
- The location for the resource
- Matching
Criterias []TriggerMatching Criteria Args - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- Name string
- Required. The resource name of the trigger. Must be unique within the location on the project.
- Project string
- The project for the resource
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Service
Account string - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - Transport
Trigger
Transport Args - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- Uid string
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- Update
Time string - Output only. The last-modified time.
- channel String
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - conditions Map<String,String>
- Output only. The reason(s) why a trigger is in FAILED state.
- create
Time String - Output only. The creation time.
- destination
Trigger
Destination - Required. Destination specifies where the events should be sent to.
- effective
Labels 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.
- etag String
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- event
Data StringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - labels Map<String,String>
- Optional. User labels attached to the triggers that can be used to group resources. 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. - location String
- The location for the resource
- matching
Criterias List<TriggerMatching Criteria> - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- name String
- Required. The resource name of the trigger. Must be unique within the location on the project.
- project String
- The project for the resource
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- service
Account String - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - transport
Trigger
Transport - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- uid String
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- update
Time String - Output only. The last-modified time.
- channel string
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - conditions {[key: string]: string}
- Output only. The reason(s) why a trigger is in FAILED state.
- create
Time string - Output only. The creation time.
- destination
Trigger
Destination - Required. Destination specifies where the events should be sent to.
- effective
Labels {[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.
- etag string
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- event
Data stringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - labels {[key: string]: string}
- Optional. User labels attached to the triggers that can be used to group resources. 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. - location string
- The location for the resource
- matching
Criterias TriggerMatching Criteria[] - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- name string
- Required. The resource name of the trigger. Must be unique within the location on the project.
- project string
- The project for the resource
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- service
Account string - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - transport
Trigger
Transport - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- uid string
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- update
Time string - Output only. The last-modified time.
- channel str
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - conditions Mapping[str, str]
- Output only. The reason(s) why a trigger is in FAILED state.
- create_
time str - Output only. The creation time.
- destination
Trigger
Destination Args - Required. Destination specifies where the events should be sent to.
- 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.
- etag str
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- event_
data_ strcontent_ type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - labels Mapping[str, str]
- Optional. User labels attached to the triggers that can be used to group resources. 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. - location str
- The location for the resource
- matching_
criterias Sequence[TriggerMatching Criteria Args] - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- name str
- Required. The resource name of the trigger. Must be unique within the location on the project.
- project str
- The project for the resource
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- service_
account str - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - transport
Trigger
Transport Args - Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- uid str
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- update_
time str - Output only. The last-modified time.
- channel String
- Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel}
format. You must provide a channel to receive events from Eventarc SaaS partners. - conditions Map<String>
- Output only. The reason(s) why a trigger is in FAILED state.
- create
Time String - Output only. The creation time.
- destination Property Map
- Required. Destination specifies where the events should be sent to.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag String
- Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding.
- event
Data StringContent Type - Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data
field. This is set to
application/json
if the value is not defined. - labels Map<String>
- Optional. User labels attached to the triggers that can be used to group resources. 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. - location String
- The location for the resource
- matching
Criterias List<Property Map> - Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination.
- name String
- Required. The resource name of the trigger. Must be unique within the location on the project.
- project String
- The project for the resource
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- service
Account String - Optional. The IAM service account email associated with the trigger. The service account represents the identity of the
trigger. The principal who calls this API must have
iam.serviceAccounts.actAs
permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. In order to create Audit Log triggers, the service account should also haveroles/eventarc.eventReceiver
IAM role. - transport Property Map
- Optional. In order to deliver messages, Eventarc may use other GCP products as transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- uid String
- Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- update
Time String - Output only. The last-modified time.
Supporting Types
TriggerDestination, TriggerDestinationArgs
- Cloud
Function string - The Cloud Function resource name. Only Cloud Functions V2 is supported. Format projects/{project}/locations/{location}/functions/{function} This is a read-only field. [WARNING] Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.
- Cloud
Run TriggerService Destination Cloud Run Service - Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
- Gke
Trigger
Destination Gke - A GKE service capable of receiving events. The service should be running in the same project as the trigger.
- Http
Endpoint TriggerDestination Http Endpoint - An HTTP endpoint destination described by an URI.
- Network
Config TriggerDestination Network Config - Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
- Workflow string
- The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format:
projects/{project}/locations/{location}/workflows/{workflow}
- Cloud
Function string - The Cloud Function resource name. Only Cloud Functions V2 is supported. Format projects/{project}/locations/{location}/functions/{function} This is a read-only field. [WARNING] Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.
- Cloud
Run TriggerService Destination Cloud Run Service - Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
- Gke
Trigger
Destination Gke - A GKE service capable of receiving events. The service should be running in the same project as the trigger.
- Http
Endpoint TriggerDestination Http Endpoint - An HTTP endpoint destination described by an URI.
- Network
Config TriggerDestination Network Config - Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
- Workflow string
- The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format:
projects/{project}/locations/{location}/workflows/{workflow}
- cloud
Function String - The Cloud Function resource name. Only Cloud Functions V2 is supported. Format projects/{project}/locations/{location}/functions/{function} This is a read-only field. [WARNING] Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.
- cloud
Run TriggerService Destination Cloud Run Service - Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
- gke
Trigger
Destination Gke - A GKE service capable of receiving events. The service should be running in the same project as the trigger.
- http
Endpoint TriggerDestination Http Endpoint - An HTTP endpoint destination described by an URI.
- network
Config TriggerDestination Network Config - Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
- workflow String
- The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format:
projects/{project}/locations/{location}/workflows/{workflow}
- cloud
Function string - The Cloud Function resource name. Only Cloud Functions V2 is supported. Format projects/{project}/locations/{location}/functions/{function} This is a read-only field. [WARNING] Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.
- cloud
Run TriggerService Destination Cloud Run Service - Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
- gke
Trigger
Destination Gke - A GKE service capable of receiving events. The service should be running in the same project as the trigger.
- http
Endpoint TriggerDestination Http Endpoint - An HTTP endpoint destination described by an URI.
- network
Config TriggerDestination Network Config - Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
- workflow string
- The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format:
projects/{project}/locations/{location}/workflows/{workflow}
- cloud_
function str - The Cloud Function resource name. Only Cloud Functions V2 is supported. Format projects/{project}/locations/{location}/functions/{function} This is a read-only field. [WARNING] Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.
- cloud_
run_ Triggerservice Destination Cloud Run Service - Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
- gke
Trigger
Destination Gke - A GKE service capable of receiving events. The service should be running in the same project as the trigger.
- http_
endpoint TriggerDestination Http Endpoint - An HTTP endpoint destination described by an URI.
- network_
config TriggerDestination Network Config - Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
- workflow str
- The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format:
projects/{project}/locations/{location}/workflows/{workflow}
- cloud
Function String - The Cloud Function resource name. Only Cloud Functions V2 is supported. Format projects/{project}/locations/{location}/functions/{function} This is a read-only field. [WARNING] Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.
- cloud
Run Property MapService - Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
- gke Property Map
- A GKE service capable of receiving events. The service should be running in the same project as the trigger.
- http
Endpoint Property Map - An HTTP endpoint destination described by an URI.
- network
Config Property Map - Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
- workflow String
- The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format:
projects/{project}/locations/{location}/workflows/{workflow}
TriggerDestinationCloudRunService, TriggerDestinationCloudRunServiceArgs
- Service string
- Required. The name of the Cloud Run service being addressed. See https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. Only services located in the same project of the trigger object can be addressed.
- Path string
- Optional. The relative path on the Cloud Run service the events should be sent to. The value must conform to the definition of URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- Region string
- Required. The region the Cloud Run service is deployed in.
- Service string
- Required. The name of the Cloud Run service being addressed. See https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. Only services located in the same project of the trigger object can be addressed.
- Path string
- Optional. The relative path on the Cloud Run service the events should be sent to. The value must conform to the definition of URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- Region string
- Required. The region the Cloud Run service is deployed in.
- service String
- Required. The name of the Cloud Run service being addressed. See https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. Only services located in the same project of the trigger object can be addressed.
- path String
- Optional. The relative path on the Cloud Run service the events should be sent to. The value must conform to the definition of URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- region String
- Required. The region the Cloud Run service is deployed in.
- service string
- Required. The name of the Cloud Run service being addressed. See https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. Only services located in the same project of the trigger object can be addressed.
- path string
- Optional. The relative path on the Cloud Run service the events should be sent to. The value must conform to the definition of URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- region string
- Required. The region the Cloud Run service is deployed in.
- service str
- Required. The name of the Cloud Run service being addressed. See https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. Only services located in the same project of the trigger object can be addressed.
- path str
- Optional. The relative path on the Cloud Run service the events should be sent to. The value must conform to the definition of URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- region str
- Required. The region the Cloud Run service is deployed in.
- service String
- Required. The name of the Cloud Run service being addressed. See https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. Only services located in the same project of the trigger object can be addressed.
- path String
- Optional. The relative path on the Cloud Run service the events should be sent to. The value must conform to the definition of URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- region String
- Required. The region the Cloud Run service is deployed in.
TriggerDestinationGke, TriggerDestinationGkeArgs
- Cluster string
- Required. The name of the cluster the GKE service is running in. The cluster must be running in the same project as the trigger being created.
- Location string
- Required. The name of the Google Compute Engine in which the cluster resides, which can either be compute zone (for example, us-central1-a) for the zonal clusters or region (for example, us-central1) for regional clusters.
- Namespace string
- Required. The namespace the GKE service is running in.
- Service string
- Required. Name of the GKE service.
- Path string
- Optional. The relative path on the GKE service the events should be sent to. The value must conform to the definition of a URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- Cluster string
- Required. The name of the cluster the GKE service is running in. The cluster must be running in the same project as the trigger being created.
- Location string
- Required. The name of the Google Compute Engine in which the cluster resides, which can either be compute zone (for example, us-central1-a) for the zonal clusters or region (for example, us-central1) for regional clusters.
- Namespace string
- Required. The namespace the GKE service is running in.
- Service string
- Required. Name of the GKE service.
- Path string
- Optional. The relative path on the GKE service the events should be sent to. The value must conform to the definition of a URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- cluster String
- Required. The name of the cluster the GKE service is running in. The cluster must be running in the same project as the trigger being created.
- location String
- Required. The name of the Google Compute Engine in which the cluster resides, which can either be compute zone (for example, us-central1-a) for the zonal clusters or region (for example, us-central1) for regional clusters.
- namespace String
- Required. The namespace the GKE service is running in.
- service String
- Required. Name of the GKE service.
- path String
- Optional. The relative path on the GKE service the events should be sent to. The value must conform to the definition of a URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- cluster string
- Required. The name of the cluster the GKE service is running in. The cluster must be running in the same project as the trigger being created.
- location string
- Required. The name of the Google Compute Engine in which the cluster resides, which can either be compute zone (for example, us-central1-a) for the zonal clusters or region (for example, us-central1) for regional clusters.
- namespace string
- Required. The namespace the GKE service is running in.
- service string
- Required. Name of the GKE service.
- path string
- Optional. The relative path on the GKE service the events should be sent to. The value must conform to the definition of a URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- cluster str
- Required. The name of the cluster the GKE service is running in. The cluster must be running in the same project as the trigger being created.
- location str
- Required. The name of the Google Compute Engine in which the cluster resides, which can either be compute zone (for example, us-central1-a) for the zonal clusters or region (for example, us-central1) for regional clusters.
- namespace str
- Required. The namespace the GKE service is running in.
- service str
- Required. Name of the GKE service.
- path str
- Optional. The relative path on the GKE service the events should be sent to. The value must conform to the definition of a URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
- cluster String
- Required. The name of the cluster the GKE service is running in. The cluster must be running in the same project as the trigger being created.
- location String
- Required. The name of the Google Compute Engine in which the cluster resides, which can either be compute zone (for example, us-central1-a) for the zonal clusters or region (for example, us-central1) for regional clusters.
- namespace String
- Required. The namespace the GKE service is running in.
- service String
- Required. Name of the GKE service.
- path String
- Optional. The relative path on the GKE service the events should be sent to. The value must conform to the definition of a URI path segment (section 3.3 of RFC2396). Examples: "/route", "route", "route/subroute".
TriggerDestinationHttpEndpoint, TriggerDestinationHttpEndpointArgs
- Uri string
- Required. The URI of the HTTP enpdoint. The value must be a RFC2396 URI string. Examples:
http://10.10.10.8:80/route
,http://svc.us-central1.p.local:8080/
. Only HTTP and HTTPS protocols are supported. The host can be either a static IP addressable from the VPC specified by the network config, or an internal DNS hostname of the service resolvable via Cloud DNS.
- Uri string
- Required. The URI of the HTTP enpdoint. The value must be a RFC2396 URI string. Examples:
http://10.10.10.8:80/route
,http://svc.us-central1.p.local:8080/
. Only HTTP and HTTPS protocols are supported. The host can be either a static IP addressable from the VPC specified by the network config, or an internal DNS hostname of the service resolvable via Cloud DNS.
- uri String
- Required. The URI of the HTTP enpdoint. The value must be a RFC2396 URI string. Examples:
http://10.10.10.8:80/route
,http://svc.us-central1.p.local:8080/
. Only HTTP and HTTPS protocols are supported. The host can be either a static IP addressable from the VPC specified by the network config, or an internal DNS hostname of the service resolvable via Cloud DNS.
- uri string
- Required. The URI of the HTTP enpdoint. The value must be a RFC2396 URI string. Examples:
http://10.10.10.8:80/route
,http://svc.us-central1.p.local:8080/
. Only HTTP and HTTPS protocols are supported. The host can be either a static IP addressable from the VPC specified by the network config, or an internal DNS hostname of the service resolvable via Cloud DNS.
- uri str
- Required. The URI of the HTTP enpdoint. The value must be a RFC2396 URI string. Examples:
http://10.10.10.8:80/route
,http://svc.us-central1.p.local:8080/
. Only HTTP and HTTPS protocols are supported. The host can be either a static IP addressable from the VPC specified by the network config, or an internal DNS hostname of the service resolvable via Cloud DNS.
- uri String
- Required. The URI of the HTTP enpdoint. The value must be a RFC2396 URI string. Examples:
http://10.10.10.8:80/route
,http://svc.us-central1.p.local:8080/
. Only HTTP and HTTPS protocols are supported. The host can be either a static IP addressable from the VPC specified by the network config, or an internal DNS hostname of the service resolvable via Cloud DNS.
TriggerDestinationNetworkConfig, TriggerDestinationNetworkConfigArgs
- Network
Attachment string - Required. Name of the NetworkAttachment that allows access to the destination VPC. Format:
projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}
- Network
Attachment string - Required. Name of the NetworkAttachment that allows access to the destination VPC. Format:
projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}
- network
Attachment String - Required. Name of the NetworkAttachment that allows access to the destination VPC. Format:
projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}
- network
Attachment string - Required. Name of the NetworkAttachment that allows access to the destination VPC. Format:
projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}
- network_
attachment str - Required. Name of the NetworkAttachment that allows access to the destination VPC. Format:
projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}
- network
Attachment String - Required. Name of the NetworkAttachment that allows access to the destination VPC. Format:
projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}
TriggerMatchingCriteria, TriggerMatchingCriteriaArgs
- Attribute string
- Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. All triggers MUST provide a filter for the 'type' attribute.
- Value string
- Required. The value for the attribute. See https://cloud.google.com/eventarc/docs/creating-triggers#trigger-gcloud for available values.
- Operator string
- Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is
match-path-pattern
.
- Attribute string
- Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. All triggers MUST provide a filter for the 'type' attribute.
- Value string
- Required. The value for the attribute. See https://cloud.google.com/eventarc/docs/creating-triggers#trigger-gcloud for available values.
- Operator string
- Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is
match-path-pattern
.
- attribute String
- Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. All triggers MUST provide a filter for the 'type' attribute.
- value String
- Required. The value for the attribute. See https://cloud.google.com/eventarc/docs/creating-triggers#trigger-gcloud for available values.
- operator String
- Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is
match-path-pattern
.
- attribute string
- Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. All triggers MUST provide a filter for the 'type' attribute.
- value string
- Required. The value for the attribute. See https://cloud.google.com/eventarc/docs/creating-triggers#trigger-gcloud for available values.
- operator string
- Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is
match-path-pattern
.
- attribute str
- Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. All triggers MUST provide a filter for the 'type' attribute.
- value str
- Required. The value for the attribute. See https://cloud.google.com/eventarc/docs/creating-triggers#trigger-gcloud for available values.
- operator str
- Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is
match-path-pattern
.
- attribute String
- Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. All triggers MUST provide a filter for the 'type' attribute.
- value String
- Required. The value for the attribute. See https://cloud.google.com/eventarc/docs/creating-triggers#trigger-gcloud for available values.
- operator String
- Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is
match-path-pattern
.
TriggerTransport, TriggerTransportArgs
- Pubsub
Trigger
Transport Pubsub - The Pub/Sub topic and subscription used by Eventarc as delivery intermediary.
- Pubsub
Trigger
Transport Pubsub - The Pub/Sub topic and subscription used by Eventarc as delivery intermediary.
- pubsub
Trigger
Transport Pubsub - The Pub/Sub topic and subscription used by Eventarc as delivery intermediary.
- pubsub
Trigger
Transport Pubsub - The Pub/Sub topic and subscription used by Eventarc as delivery intermediary.
- pubsub
Trigger
Transport Pubsub - The Pub/Sub topic and subscription used by Eventarc as delivery intermediary.
- pubsub Property Map
- The Pub/Sub topic and subscription used by Eventarc as delivery intermediary.
TriggerTransportPubsub, TriggerTransportPubsubArgs
- Subscription string
- Output only. The name of the Pub/Sub subscription created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}
. - Topic string
- Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/topics/{TOPIC_NAME}. You may set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished
only. The topic you provide here will not be deleted by Eventarc at trigger deletion.
- Subscription string
- Output only. The name of the Pub/Sub subscription created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}
. - Topic string
- Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/topics/{TOPIC_NAME}. You may set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished
only. The topic you provide here will not be deleted by Eventarc at trigger deletion.
- subscription String
- Output only. The name of the Pub/Sub subscription created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}
. - topic String
- Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/topics/{TOPIC_NAME}. You may set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished
only. The topic you provide here will not be deleted by Eventarc at trigger deletion.
- subscription string
- Output only. The name of the Pub/Sub subscription created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}
. - topic string
- Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/topics/{TOPIC_NAME}. You may set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished
only. The topic you provide here will not be deleted by Eventarc at trigger deletion.
- subscription str
- Output only. The name of the Pub/Sub subscription created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}
. - topic str
- Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/topics/{TOPIC_NAME}. You may set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished
only. The topic you provide here will not be deleted by Eventarc at trigger deletion.
- subscription String
- Output only. The name of the Pub/Sub subscription created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}
. - topic String
- Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format:
projects/{PROJECT_ID}/topics/{TOPIC_NAME}. You may set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished
only. The topic you provide here will not be deleted by Eventarc at trigger deletion.
Import
Trigger can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/triggers/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
When using the pulumi import
command, Trigger can be imported using one of the formats above. For example:
$ pulumi import gcp:eventarc/trigger:Trigger default projects/{{project}}/locations/{{location}}/triggers/{{name}}
$ pulumi import gcp:eventarc/trigger:Trigger default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:eventarc/trigger:Trigger default {{location}}/{{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.