Enrollment

class Enrollment : KotlinCustomResource

The Eventarc Enrollment resource To get more information about Enrollment, see:

Example Usage

Eventarc Enrollment With Pipeline Destination

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const pipeline = new gcp.eventarc.Pipeline("pipeline", {
location: "us-central1",
pipelineId: "some-pipeline",
destinations: [{
httpEndpoint: {
uri: "https://10.77.0.0:80/route",
},
networkConfig: {
networkAttachment: "projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment",
},
}],
});
const primary = new gcp.eventarc.Enrollment("primary", {
location: "us-central1",
enrollmentId: "some-enrollment",
messageBus: primaryGoogleEventarcMessageBus.id,
destination: pipeline.id,
celMatch: "message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'",
});
const messageBus = new gcp.eventarc.MessageBus("message_bus", {
location: "us-central1",
messageBusId: "some-message-bus",
});
import pulumi
import pulumi_gcp as gcp
pipeline = gcp.eventarc.Pipeline("pipeline",
location="us-central1",
pipeline_id="some-pipeline",
destinations=[{
"http_endpoint": {
"uri": "https://10.77.0.0:80/route",
},
"network_config": {
"network_attachment": "projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment",
},
}])
primary = gcp.eventarc.Enrollment("primary",
location="us-central1",
enrollment_id="some-enrollment",
message_bus=primary_google_eventarc_message_bus["id"],
destination=pipeline.id,
cel_match="message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'")
message_bus = gcp.eventarc.MessageBus("message_bus",
location="us-central1",
message_bus_id="some-message-bus")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var pipeline = new Gcp.Eventarc.Pipeline("pipeline", new()
{
Location = "us-central1",
PipelineId = "some-pipeline",
Destinations = new[]
{
new Gcp.Eventarc.Inputs.PipelineDestinationArgs
{
HttpEndpoint = new Gcp.Eventarc.Inputs.PipelineDestinationHttpEndpointArgs
{
Uri = "https://10.77.0.0:80/route",
},
NetworkConfig = new Gcp.Eventarc.Inputs.PipelineDestinationNetworkConfigArgs
{
NetworkAttachment = "projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment",
},
},
},
});
var primary = new Gcp.Eventarc.Enrollment("primary", new()
{
Location = "us-central1",
EnrollmentId = "some-enrollment",
MessageBus = primaryGoogleEventarcMessageBus.Id,
Destination = pipeline.Id,
CelMatch = "message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'",
});
var messageBus = new Gcp.Eventarc.MessageBus("message_bus", new()
{
Location = "us-central1",
MessageBusId = "some-message-bus",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/eventarc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
pipeline, err := eventarc.NewPipeline(ctx, "pipeline", &eventarc.PipelineArgs{
Location: pulumi.String("us-central1"),
PipelineId: pulumi.String("some-pipeline"),
Destinations: eventarc.PipelineDestinationArray{
&eventarc.PipelineDestinationArgs{
HttpEndpoint: &eventarc.PipelineDestinationHttpEndpointArgs{
Uri: pulumi.String("https://10.77.0.0:80/route"),
},
NetworkConfig: &eventarc.PipelineDestinationNetworkConfigArgs{
NetworkAttachment: pulumi.String("projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment"),
},
},
},
})
if err != nil {
return err
}
_, err = eventarc.NewEnrollment(ctx, "primary", &eventarc.EnrollmentArgs{
Location: pulumi.String("us-central1"),
EnrollmentId: pulumi.String("some-enrollment"),
MessageBus: pulumi.Any(primaryGoogleEventarcMessageBus.Id),
Destination: pipeline.ID(),
CelMatch: pulumi.String("message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'"),
})
if err != nil {
return err
}
_, err = eventarc.NewMessageBus(ctx, "message_bus", &eventarc.MessageBusArgs{
Location: pulumi.String("us-central1"),
MessageBusId: pulumi.String("some-message-bus"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.eventarc.Pipeline;
import com.pulumi.gcp.eventarc.PipelineArgs;
import com.pulumi.gcp.eventarc.inputs.PipelineDestinationArgs;
import com.pulumi.gcp.eventarc.inputs.PipelineDestinationHttpEndpointArgs;
import com.pulumi.gcp.eventarc.inputs.PipelineDestinationNetworkConfigArgs;
import com.pulumi.gcp.eventarc.Enrollment;
import com.pulumi.gcp.eventarc.EnrollmentArgs;
import com.pulumi.gcp.eventarc.MessageBus;
import com.pulumi.gcp.eventarc.MessageBusArgs;
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 pipeline = new Pipeline("pipeline", PipelineArgs.builder()
.location("us-central1")
.pipelineId("some-pipeline")
.destinations(PipelineDestinationArgs.builder()
.httpEndpoint(PipelineDestinationHttpEndpointArgs.builder()
.uri("https://10.77.0.0:80/route")
.build())
.networkConfig(PipelineDestinationNetworkConfigArgs.builder()
.networkAttachment("projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment")
.build())
.build())
.build());
var primary = new Enrollment("primary", EnrollmentArgs.builder()
.location("us-central1")
.enrollmentId("some-enrollment")
.messageBus(primaryGoogleEventarcMessageBus.id())
.destination(pipeline.id())
.celMatch("message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'")
.build());
var messageBus = new MessageBus("messageBus", MessageBusArgs.builder()
.location("us-central1")
.messageBusId("some-message-bus")
.build());
}
}
resources:
primary:
type: gcp:eventarc:Enrollment
properties:
location: us-central1
enrollmentId: some-enrollment
messageBus: ${primaryGoogleEventarcMessageBus.id}
destination: ${pipeline.id}
celMatch: message.type == 'google.cloud.dataflow.job.v1beta3.statusChanged'
pipeline:
type: gcp:eventarc:Pipeline
properties:
location: us-central1
pipelineId: some-pipeline
destinations:
- httpEndpoint:
uri: https://10.77.0.0:80/route
networkConfig:
networkAttachment: projects/my-project-name/regions/us-central1/networkAttachments/some-network-attachment
messageBus:
type: gcp:eventarc:MessageBus
name: message_bus
properties:
location: us-central1
messageBusId: some-message-bus

Import

Enrollment can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/enrollments/{{enrollment_id}}

  • {{project}}/{{location}}/{{enrollment_id}}

  • {{location}}/{{enrollment_id}} When using the pulumi import command, Enrollment can be imported using one of the formats above. For example:

$ pulumi import gcp:eventarc/enrollment:Enrollment default projects/{{project}}/locations/{{location}}/enrollments/{{enrollment_id}}
$ pulumi import gcp:eventarc/enrollment:Enrollment default {{project}}/{{location}}/{{enrollment_id}}
$ pulumi import gcp:eventarc/enrollment:Enrollment default {{location}}/{{enrollment_id}}

Properties

Link copied to clipboard
val annotations: Output<Map<String, String>>?

Resource annotations. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field effective_annotations for all of the annotations present on the resource.

Link copied to clipboard
val celMatch: Output<String>

A CEL expression identifying which messages this enrollment applies to.

Link copied to clipboard
val createTime: Output<String>

The creation time.

Link copied to clipboard
val destination: Output<String>

Destination is the Pipeline that the Enrollment is delivering to. It must point to the full resource name of a Pipeline. Format: "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"

Link copied to clipboard
val displayName: Output<String>?

Resource display name.

Link copied to clipboard
Link copied to clipboard

All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.

Link copied to clipboard
val enrollmentId: Output<String>

The user-provided ID to be assigned to the Enrollment. It should match the format ^a-z?$.

Link copied to clipboard
val etag: Output<String>

This checksum is computed by the server based on the value of other fields, and might be sent only on update and delete requests to ensure that the client has an up-to-date value before proceeding.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<Map<String, String>>?

Resource labels. 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.

Link copied to clipboard
val location: Output<String>

Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.

Link copied to clipboard
val messageBus: Output<String>

Resource name of the message bus identifying the source of the messages. It matches the form projects/{project}/locations/{location}/messageBuses/{messageBus}.

Link copied to clipboard
val name: Output<String>

Resource name of the form projects/{project}/locations/{location}/enrollments/{enrollment}

Link copied to clipboard
val project: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
val pulumiLabels: Output<Map<String, String>>

The combination of labels configured directly on the resource and default labels configured on the provider.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val uid: Output<String>

Server assigned unique identifier for the channel. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

Link copied to clipboard
val updateTime: Output<String>

The last-modified time.

Link copied to clipboard
val urn: Output<String>