gcp.pubsub.Topic
Explore with Pulumi AI
A named resource to which messages are sent by publishers.
To get more information about Topic, see:
- API documentation
- How-to Guides
Note: You can retrieve the email of the Google Managed Pub/Sub Service Account used for forwarding by using the
gcp.projects.ServiceIdentityresource.
Example Usage
Pubsub Topic Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Topic("example", {
    name: "example-topic",
    labels: {
        foo: "bar",
    },
    messageRetentionDuration: "86600s",
});
import pulumi
import pulumi_gcp as gcp
example = gcp.pubsub.Topic("example",
    name="example-topic",
    labels={
        "foo": "bar",
    },
    message_retention_duration="86600s")
package main
import (
	"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 := pubsub.NewTopic(ctx, "example", &pubsub.TopicArgs{
			Name: pulumi.String("example-topic"),
			Labels: pulumi.StringMap{
				"foo": pulumi.String("bar"),
			},
			MessageRetentionDuration: pulumi.String("86600s"),
		})
		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 example = new Gcp.PubSub.Topic("example", new()
    {
        Name = "example-topic",
        Labels = 
        {
            { "foo", "bar" },
        },
        MessageRetentionDuration = "86600s",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 example = new Topic("example", TopicArgs.builder()
            .name("example-topic")
            .labels(Map.of("foo", "bar"))
            .messageRetentionDuration("86600s")
            .build());
    }
}
resources:
  example:
    type: gcp:pubsub:Topic
    properties:
      name: example-topic
      labels:
        foo: bar
      messageRetentionDuration: 86600s
Pubsub Topic Cmek
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const keyRing = new gcp.kms.KeyRing("key_ring", {
    name: "example-keyring",
    location: "global",
});
const cryptoKey = new gcp.kms.CryptoKey("crypto_key", {
    name: "example-key",
    keyRing: keyRing.id,
});
const example = new gcp.pubsub.Topic("example", {
    name: "example-topic",
    kmsKeyName: cryptoKey.id,
});
import pulumi
import pulumi_gcp as gcp
key_ring = gcp.kms.KeyRing("key_ring",
    name="example-keyring",
    location="global")
crypto_key = gcp.kms.CryptoKey("crypto_key",
    name="example-key",
    key_ring=key_ring.id)
example = gcp.pubsub.Topic("example",
    name="example-topic",
    kms_key_name=crypto_key.id)
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/kms"
	"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 {
		keyRing, err := kms.NewKeyRing(ctx, "key_ring", &kms.KeyRingArgs{
			Name:     pulumi.String("example-keyring"),
			Location: pulumi.String("global"),
		})
		if err != nil {
			return err
		}
		cryptoKey, err := kms.NewCryptoKey(ctx, "crypto_key", &kms.CryptoKeyArgs{
			Name:    pulumi.String("example-key"),
			KeyRing: keyRing.ID(),
		})
		if err != nil {
			return err
		}
		_, err = pubsub.NewTopic(ctx, "example", &pubsub.TopicArgs{
			Name:       pulumi.String("example-topic"),
			KmsKeyName: cryptoKey.ID(),
		})
		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 keyRing = new Gcp.Kms.KeyRing("key_ring", new()
    {
        Name = "example-keyring",
        Location = "global",
    });
    var cryptoKey = new Gcp.Kms.CryptoKey("crypto_key", new()
    {
        Name = "example-key",
        KeyRing = keyRing.Id,
    });
    var example = new Gcp.PubSub.Topic("example", new()
    {
        Name = "example-topic",
        KmsKeyName = cryptoKey.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.kms.KeyRing;
import com.pulumi.gcp.kms.KeyRingArgs;
import com.pulumi.gcp.kms.CryptoKey;
import com.pulumi.gcp.kms.CryptoKeyArgs;
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 keyRing = new KeyRing("keyRing", KeyRingArgs.builder()
            .name("example-keyring")
            .location("global")
            .build());
        var cryptoKey = new CryptoKey("cryptoKey", CryptoKeyArgs.builder()
            .name("example-key")
            .keyRing(keyRing.id())
            .build());
        var example = new Topic("example", TopicArgs.builder()
            .name("example-topic")
            .kmsKeyName(cryptoKey.id())
            .build());
    }
}
resources:
  example:
    type: gcp:pubsub:Topic
    properties:
      name: example-topic
      kmsKeyName: ${cryptoKey.id}
  cryptoKey:
    type: gcp:kms:CryptoKey
    name: crypto_key
    properties:
      name: example-key
      keyRing: ${keyRing.id}
  keyRing:
    type: gcp:kms:KeyRing
    name: key_ring
    properties:
      name: example-keyring
      location: global
Pubsub Topic Geo Restricted
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Topic("example", {
    name: "example-topic",
    messageStoragePolicy: {
        allowedPersistenceRegions: ["europe-west3"],
        enforceInTransit: true,
    },
});
import pulumi
import pulumi_gcp as gcp
example = gcp.pubsub.Topic("example",
    name="example-topic",
    message_storage_policy={
        "allowed_persistence_regions": ["europe-west3"],
        "enforce_in_transit": True,
    })
package main
import (
	"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 := pubsub.NewTopic(ctx, "example", &pubsub.TopicArgs{
			Name: pulumi.String("example-topic"),
			MessageStoragePolicy: &pubsub.TopicMessageStoragePolicyArgs{
				AllowedPersistenceRegions: pulumi.StringArray{
					pulumi.String("europe-west3"),
				},
				EnforceInTransit: pulumi.Bool(true),
			},
		})
		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 example = new Gcp.PubSub.Topic("example", new()
    {
        Name = "example-topic",
        MessageStoragePolicy = new Gcp.PubSub.Inputs.TopicMessageStoragePolicyArgs
        {
            AllowedPersistenceRegions = new[]
            {
                "europe-west3",
            },
            EnforceInTransit = true,
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.pubsub.inputs.TopicMessageStoragePolicyArgs;
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 example = new Topic("example", TopicArgs.builder()
            .name("example-topic")
            .messageStoragePolicy(TopicMessageStoragePolicyArgs.builder()
                .allowedPersistenceRegions("europe-west3")
                .enforceInTransit(true)
                .build())
            .build());
    }
}
resources:
  example:
    type: gcp:pubsub:Topic
    properties:
      name: example-topic
      messageStoragePolicy:
        allowedPersistenceRegions:
          - europe-west3
        enforceInTransit: true
Pubsub Topic Schema Settings
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Schema("example", {
    name: "example",
    type: "AVRO",
    definition: `{
  "type" : "record",
  "name" : "Avro",
  "fields" : [
    {
      "name" : "StringField",
      "type" : "string"
    },
    {
      "name" : "IntField",
      "type" : "int"
    }
  ]
}
`,
});
const exampleTopic = new gcp.pubsub.Topic("example", {
    name: "example-topic",
    schemaSettings: {
        schema: "projects/my-project-name/schemas/example",
        encoding: "JSON",
    },
}, {
    dependsOn: [example],
});
import pulumi
import pulumi_gcp as gcp
example = gcp.pubsub.Schema("example",
    name="example",
    type="AVRO",
    definition="""{
  "type" : "record",
  "name" : "Avro",
  "fields" : [
    {
      "name" : "StringField",
      "type" : "string"
    },
    {
      "name" : "IntField",
      "type" : "int"
    }
  ]
}
""")
example_topic = gcp.pubsub.Topic("example",
    name="example-topic",
    schema_settings={
        "schema": "projects/my-project-name/schemas/example",
        "encoding": "JSON",
    },
    opts = pulumi.ResourceOptions(depends_on=[example]))
package main
import (
	"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 {
		example, err := pubsub.NewSchema(ctx, "example", &pubsub.SchemaArgs{
			Name: pulumi.String("example"),
			Type: pulumi.String("AVRO"),
			Definition: pulumi.String(`{
  "type" : "record",
  "name" : "Avro",
  "fields" : [
    {
      "name" : "StringField",
      "type" : "string"
    },
    {
      "name" : "IntField",
      "type" : "int"
    }
  ]
}
`),
		})
		if err != nil {
			return err
		}
		_, err = pubsub.NewTopic(ctx, "example", &pubsub.TopicArgs{
			Name: pulumi.String("example-topic"),
			SchemaSettings: &pubsub.TopicSchemaSettingsArgs{
				Schema:   pulumi.String("projects/my-project-name/schemas/example"),
				Encoding: pulumi.String("JSON"),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			example,
		}))
		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 example = new Gcp.PubSub.Schema("example", new()
    {
        Name = "example",
        Type = "AVRO",
        Definition = @"{
  ""type"" : ""record"",
  ""name"" : ""Avro"",
  ""fields"" : [
    {
      ""name"" : ""StringField"",
      ""type"" : ""string""
    },
    {
      ""name"" : ""IntField"",
      ""type"" : ""int""
    }
  ]
}
",
    });
    var exampleTopic = new Gcp.PubSub.Topic("example", new()
    {
        Name = "example-topic",
        SchemaSettings = new Gcp.PubSub.Inputs.TopicSchemaSettingsArgs
        {
            Schema = "projects/my-project-name/schemas/example",
            Encoding = "JSON",
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            example,
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.pubsub.Schema;
import com.pulumi.gcp.pubsub.SchemaArgs;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.pubsub.inputs.TopicSchemaSettingsArgs;
import com.pulumi.resources.CustomResourceOptions;
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 example = new Schema("example", SchemaArgs.builder()
            .name("example")
            .type("AVRO")
            .definition("""
{
  "type" : "record",
  "name" : "Avro",
  "fields" : [
    {
      "name" : "StringField",
      "type" : "string"
    },
    {
      "name" : "IntField",
      "type" : "int"
    }
  ]
}
            """)
            .build());
        var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()
            .name("example-topic")
            .schemaSettings(TopicSchemaSettingsArgs.builder()
                .schema("projects/my-project-name/schemas/example")
                .encoding("JSON")
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(example)
                .build());
    }
}
resources:
  example:
    type: gcp:pubsub:Schema
    properties:
      name: example
      type: AVRO
      definition: |
        {
          "type" : "record",
          "name" : "Avro",
          "fields" : [
            {
              "name" : "StringField",
              "type" : "string"
            },
            {
              "name" : "IntField",
              "type" : "int"
            }
          ]
        }        
  exampleTopic:
    type: gcp:pubsub:Topic
    name: example
    properties:
      name: example-topic
      schemaSettings:
        schema: projects/my-project-name/schemas/example
        encoding: JSON
    options:
      dependsOn:
        - ${example}
Pubsub Topic Ingestion Kinesis
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Topic("example", {
    name: "example-topic",
    ingestionDataSourceSettings: {
        awsKinesis: {
            streamArn: "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name",
            consumerArn: "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/consumer/consumer-1:1111111111",
            awsRoleArn: "arn:aws:iam::111111111111:role/fake-role-name",
            gcpServiceAccount: "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
        },
    },
});
import pulumi
import pulumi_gcp as gcp
example = gcp.pubsub.Topic("example",
    name="example-topic",
    ingestion_data_source_settings={
        "aws_kinesis": {
            "stream_arn": "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name",
            "consumer_arn": "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/consumer/consumer-1:1111111111",
            "aws_role_arn": "arn:aws:iam::111111111111:role/fake-role-name",
            "gcp_service_account": "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
        },
    })
package main
import (
	"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 := pubsub.NewTopic(ctx, "example", &pubsub.TopicArgs{
			Name: pulumi.String("example-topic"),
			IngestionDataSourceSettings: &pubsub.TopicIngestionDataSourceSettingsArgs{
				AwsKinesis: &pubsub.TopicIngestionDataSourceSettingsAwsKinesisArgs{
					StreamArn:         pulumi.String("arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name"),
					ConsumerArn:       pulumi.String("arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/consumer/consumer-1:1111111111"),
					AwsRoleArn:        pulumi.String("arn:aws:iam::111111111111:role/fake-role-name"),
					GcpServiceAccount: pulumi.String("fake-service-account@fake-gcp-project.iam.gserviceaccount.com"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var example = new Gcp.PubSub.Topic("example", new()
    {
        Name = "example-topic",
        IngestionDataSourceSettings = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsArgs
        {
            AwsKinesis = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsAwsKinesisArgs
            {
                StreamArn = "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name",
                ConsumerArn = "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/consumer/consumer-1:1111111111",
                AwsRoleArn = "arn:aws:iam::111111111111:role/fake-role-name",
                GcpServiceAccount = "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsAwsKinesisArgs;
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 example = new Topic("example", TopicArgs.builder()
            .name("example-topic")
            .ingestionDataSourceSettings(TopicIngestionDataSourceSettingsArgs.builder()
                .awsKinesis(TopicIngestionDataSourceSettingsAwsKinesisArgs.builder()
                    .streamArn("arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name")
                    .consumerArn("arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/consumer/consumer-1:1111111111")
                    .awsRoleArn("arn:aws:iam::111111111111:role/fake-role-name")
                    .gcpServiceAccount("fake-service-account@fake-gcp-project.iam.gserviceaccount.com")
                    .build())
                .build())
            .build());
    }
}
resources:
  example:
    type: gcp:pubsub:Topic
    properties:
      name: example-topic
      ingestionDataSourceSettings:
        awsKinesis:
          streamArn: arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name
          consumerArn: arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name/consumer/consumer-1:1111111111
          awsRoleArn: arn:aws:iam::111111111111:role/fake-role-name
          gcpServiceAccount: fake-service-account@fake-gcp-project.iam.gserviceaccount.com
Pubsub Topic Ingestion Cloud Storage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Topic("example", {
    name: "example-topic",
    ingestionDataSourceSettings: {
        cloudStorage: {
            bucket: "test-bucket",
            textFormat: {
                delimiter: " ",
            },
            minimumObjectCreateTime: "2024-01-01T00:00:00Z",
            matchGlob: "foo/**",
        },
        platformLogsSettings: {
            severity: "WARNING",
        },
    },
});
import pulumi
import pulumi_gcp as gcp
example = gcp.pubsub.Topic("example",
    name="example-topic",
    ingestion_data_source_settings={
        "cloud_storage": {
            "bucket": "test-bucket",
            "text_format": {
                "delimiter": " ",
            },
            "minimum_object_create_time": "2024-01-01T00:00:00Z",
            "match_glob": "foo/**",
        },
        "platform_logs_settings": {
            "severity": "WARNING",
        },
    })
package main
import (
	"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 := pubsub.NewTopic(ctx, "example", &pubsub.TopicArgs{
			Name: pulumi.String("example-topic"),
			IngestionDataSourceSettings: &pubsub.TopicIngestionDataSourceSettingsArgs{
				CloudStorage: &pubsub.TopicIngestionDataSourceSettingsCloudStorageArgs{
					Bucket: pulumi.String("test-bucket"),
					TextFormat: &pubsub.TopicIngestionDataSourceSettingsCloudStorageTextFormatArgs{
						Delimiter: pulumi.String(" "),
					},
					MinimumObjectCreateTime: pulumi.String("2024-01-01T00:00:00Z"),
					MatchGlob:               pulumi.String("foo/**"),
				},
				PlatformLogsSettings: &pubsub.TopicIngestionDataSourceSettingsPlatformLogsSettingsArgs{
					Severity: pulumi.String("WARNING"),
				},
			},
		})
		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 example = new Gcp.PubSub.Topic("example", new()
    {
        Name = "example-topic",
        IngestionDataSourceSettings = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsArgs
        {
            CloudStorage = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsCloudStorageArgs
            {
                Bucket = "test-bucket",
                TextFormat = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsCloudStorageTextFormatArgs
                {
                    Delimiter = " ",
                },
                MinimumObjectCreateTime = "2024-01-01T00:00:00Z",
                MatchGlob = "foo/**",
            },
            PlatformLogsSettings = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsPlatformLogsSettingsArgs
            {
                Severity = "WARNING",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsCloudStorageArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsCloudStorageTextFormatArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsPlatformLogsSettingsArgs;
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 example = new Topic("example", TopicArgs.builder()
            .name("example-topic")
            .ingestionDataSourceSettings(TopicIngestionDataSourceSettingsArgs.builder()
                .cloudStorage(TopicIngestionDataSourceSettingsCloudStorageArgs.builder()
                    .bucket("test-bucket")
                    .textFormat(TopicIngestionDataSourceSettingsCloudStorageTextFormatArgs.builder()
                        .delimiter(" ")
                        .build())
                    .minimumObjectCreateTime("2024-01-01T00:00:00Z")
                    .matchGlob("foo/**")
                    .build())
                .platformLogsSettings(TopicIngestionDataSourceSettingsPlatformLogsSettingsArgs.builder()
                    .severity("WARNING")
                    .build())
                .build())
            .build());
    }
}
resources:
  example:
    type: gcp:pubsub:Topic
    properties:
      name: example-topic
      ingestionDataSourceSettings:
        cloudStorage:
          bucket: test-bucket
          textFormat:
            delimiter: ' '
          minimumObjectCreateTime: 2024-01-01T00:00:00Z
          matchGlob: foo/**
        platformLogsSettings:
          severity: WARNING
Pubsub Topic Ingestion Azure Event Hubs
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Topic("example", {
    name: "example-topic",
    ingestionDataSourceSettings: {
        azureEventHubs: {
            resourceGroup: "azure-ingestion-resource-group",
            namespace: "azure-ingestion-namespace",
            eventHub: "azure-ingestion-event-hub",
            clientId: "aZZZZZZZ-YYYY-HHHH-GGGG-abcdef569123",
            tenantId: "0XXXXXXX-YYYY-HHHH-GGGG-123456789123",
            subscriptionId: "bXXXXXXX-YYYY-HHHH-GGGG-123456789123",
            gcpServiceAccount: "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
        },
    },
});
import pulumi
import pulumi_gcp as gcp
example = gcp.pubsub.Topic("example",
    name="example-topic",
    ingestion_data_source_settings={
        "azure_event_hubs": {
            "resource_group": "azure-ingestion-resource-group",
            "namespace": "azure-ingestion-namespace",
            "event_hub": "azure-ingestion-event-hub",
            "client_id": "aZZZZZZZ-YYYY-HHHH-GGGG-abcdef569123",
            "tenant_id": "0XXXXXXX-YYYY-HHHH-GGGG-123456789123",
            "subscription_id": "bXXXXXXX-YYYY-HHHH-GGGG-123456789123",
            "gcp_service_account": "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
        },
    })
package main
import (
	"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 := pubsub.NewTopic(ctx, "example", &pubsub.TopicArgs{
			Name: pulumi.String("example-topic"),
			IngestionDataSourceSettings: &pubsub.TopicIngestionDataSourceSettingsArgs{
				AzureEventHubs: &pubsub.TopicIngestionDataSourceSettingsAzureEventHubsArgs{
					ResourceGroup:     pulumi.String("azure-ingestion-resource-group"),
					Namespace:         pulumi.String("azure-ingestion-namespace"),
					EventHub:          pulumi.String("azure-ingestion-event-hub"),
					ClientId:          pulumi.String("aZZZZZZZ-YYYY-HHHH-GGGG-abcdef569123"),
					TenantId:          pulumi.String("0XXXXXXX-YYYY-HHHH-GGGG-123456789123"),
					SubscriptionId:    pulumi.String("bXXXXXXX-YYYY-HHHH-GGGG-123456789123"),
					GcpServiceAccount: pulumi.String("fake-service-account@fake-gcp-project.iam.gserviceaccount.com"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var example = new Gcp.PubSub.Topic("example", new()
    {
        Name = "example-topic",
        IngestionDataSourceSettings = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsArgs
        {
            AzureEventHubs = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsAzureEventHubsArgs
            {
                ResourceGroup = "azure-ingestion-resource-group",
                Namespace = "azure-ingestion-namespace",
                EventHub = "azure-ingestion-event-hub",
                ClientId = "aZZZZZZZ-YYYY-HHHH-GGGG-abcdef569123",
                TenantId = "0XXXXXXX-YYYY-HHHH-GGGG-123456789123",
                SubscriptionId = "bXXXXXXX-YYYY-HHHH-GGGG-123456789123",
                GcpServiceAccount = "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsAzureEventHubsArgs;
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 example = new Topic("example", TopicArgs.builder()
            .name("example-topic")
            .ingestionDataSourceSettings(TopicIngestionDataSourceSettingsArgs.builder()
                .azureEventHubs(TopicIngestionDataSourceSettingsAzureEventHubsArgs.builder()
                    .resourceGroup("azure-ingestion-resource-group")
                    .namespace("azure-ingestion-namespace")
                    .eventHub("azure-ingestion-event-hub")
                    .clientId("aZZZZZZZ-YYYY-HHHH-GGGG-abcdef569123")
                    .tenantId("0XXXXXXX-YYYY-HHHH-GGGG-123456789123")
                    .subscriptionId("bXXXXXXX-YYYY-HHHH-GGGG-123456789123")
                    .gcpServiceAccount("fake-service-account@fake-gcp-project.iam.gserviceaccount.com")
                    .build())
                .build())
            .build());
    }
}
resources:
  example:
    type: gcp:pubsub:Topic
    properties:
      name: example-topic
      ingestionDataSourceSettings:
        azureEventHubs:
          resourceGroup: azure-ingestion-resource-group
          namespace: azure-ingestion-namespace
          eventHub: azure-ingestion-event-hub
          clientId: aZZZZZZZ-YYYY-HHHH-GGGG-abcdef569123
          tenantId: 0XXXXXXX-YYYY-HHHH-GGGG-123456789123
          subscriptionId: bXXXXXXX-YYYY-HHHH-GGGG-123456789123
          gcpServiceAccount: fake-service-account@fake-gcp-project.iam.gserviceaccount.com
Pubsub Topic Ingestion Aws Msk
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Topic("example", {
    name: "example-topic",
    ingestionDataSourceSettings: {
        awsMsk: {
            clusterArn: "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name",
            topic: "test-topic",
            awsRoleArn: "arn:aws:iam::111111111111:role/fake-role-name",
            gcpServiceAccount: "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
        },
    },
});
import pulumi
import pulumi_gcp as gcp
example = gcp.pubsub.Topic("example",
    name="example-topic",
    ingestion_data_source_settings={
        "aws_msk": {
            "cluster_arn": "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name",
            "topic": "test-topic",
            "aws_role_arn": "arn:aws:iam::111111111111:role/fake-role-name",
            "gcp_service_account": "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
        },
    })
package main
import (
	"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 := pubsub.NewTopic(ctx, "example", &pubsub.TopicArgs{
			Name: pulumi.String("example-topic"),
			IngestionDataSourceSettings: &pubsub.TopicIngestionDataSourceSettingsArgs{
				AwsMsk: &pubsub.TopicIngestionDataSourceSettingsAwsMskArgs{
					ClusterArn:        pulumi.String("arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name"),
					Topic:             pulumi.String("test-topic"),
					AwsRoleArn:        pulumi.String("arn:aws:iam::111111111111:role/fake-role-name"),
					GcpServiceAccount: pulumi.String("fake-service-account@fake-gcp-project.iam.gserviceaccount.com"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var example = new Gcp.PubSub.Topic("example", new()
    {
        Name = "example-topic",
        IngestionDataSourceSettings = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsArgs
        {
            AwsMsk = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsAwsMskArgs
            {
                ClusterArn = "arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name",
                Topic = "test-topic",
                AwsRoleArn = "arn:aws:iam::111111111111:role/fake-role-name",
                GcpServiceAccount = "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsAwsMskArgs;
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 example = new Topic("example", TopicArgs.builder()
            .name("example-topic")
            .ingestionDataSourceSettings(TopicIngestionDataSourceSettingsArgs.builder()
                .awsMsk(TopicIngestionDataSourceSettingsAwsMskArgs.builder()
                    .clusterArn("arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name")
                    .topic("test-topic")
                    .awsRoleArn("arn:aws:iam::111111111111:role/fake-role-name")
                    .gcpServiceAccount("fake-service-account@fake-gcp-project.iam.gserviceaccount.com")
                    .build())
                .build())
            .build());
    }
}
resources:
  example:
    type: gcp:pubsub:Topic
    properties:
      name: example-topic
      ingestionDataSourceSettings:
        awsMsk:
          clusterArn: arn:aws:kinesis:us-west-2:111111111111:stream/fake-stream-name
          topic: test-topic
          awsRoleArn: arn:aws:iam::111111111111:role/fake-role-name
          gcpServiceAccount: fake-service-account@fake-gcp-project.iam.gserviceaccount.com
Pubsub Topic Ingestion Confluent Cloud
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Topic("example", {
    name: "example-topic",
    ingestionDataSourceSettings: {
        confluentCloud: {
            bootstrapServer: "test.us-west2.gcp.confluent.cloud:1111",
            clusterId: "1234",
            topic: "test-topic",
            identityPoolId: "test-identity-pool-id",
            gcpServiceAccount: "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
        },
    },
});
import pulumi
import pulumi_gcp as gcp
example = gcp.pubsub.Topic("example",
    name="example-topic",
    ingestion_data_source_settings={
        "confluent_cloud": {
            "bootstrap_server": "test.us-west2.gcp.confluent.cloud:1111",
            "cluster_id": "1234",
            "topic": "test-topic",
            "identity_pool_id": "test-identity-pool-id",
            "gcp_service_account": "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
        },
    })
package main
import (
	"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 := pubsub.NewTopic(ctx, "example", &pubsub.TopicArgs{
			Name: pulumi.String("example-topic"),
			IngestionDataSourceSettings: &pubsub.TopicIngestionDataSourceSettingsArgs{
				ConfluentCloud: &pubsub.TopicIngestionDataSourceSettingsConfluentCloudArgs{
					BootstrapServer:   pulumi.String("test.us-west2.gcp.confluent.cloud:1111"),
					ClusterId:         pulumi.String("1234"),
					Topic:             pulumi.String("test-topic"),
					IdentityPoolId:    pulumi.String("test-identity-pool-id"),
					GcpServiceAccount: pulumi.String("fake-service-account@fake-gcp-project.iam.gserviceaccount.com"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var example = new Gcp.PubSub.Topic("example", new()
    {
        Name = "example-topic",
        IngestionDataSourceSettings = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsArgs
        {
            ConfluentCloud = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsConfluentCloudArgs
            {
                BootstrapServer = "test.us-west2.gcp.confluent.cloud:1111",
                ClusterId = "1234",
                Topic = "test-topic",
                IdentityPoolId = "test-identity-pool-id",
                GcpServiceAccount = "fake-service-account@fake-gcp-project.iam.gserviceaccount.com",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsArgs;
import com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsConfluentCloudArgs;
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 example = new Topic("example", TopicArgs.builder()
            .name("example-topic")
            .ingestionDataSourceSettings(TopicIngestionDataSourceSettingsArgs.builder()
                .confluentCloud(TopicIngestionDataSourceSettingsConfluentCloudArgs.builder()
                    .bootstrapServer("test.us-west2.gcp.confluent.cloud:1111")
                    .clusterId("1234")
                    .topic("test-topic")
                    .identityPoolId("test-identity-pool-id")
                    .gcpServiceAccount("fake-service-account@fake-gcp-project.iam.gserviceaccount.com")
                    .build())
                .build())
            .build());
    }
}
resources:
  example:
    type: gcp:pubsub:Topic
    properties:
      name: example-topic
      ingestionDataSourceSettings:
        confluentCloud:
          bootstrapServer: test.us-west2.gcp.confluent.cloud:1111
          clusterId: '1234'
          topic: test-topic
          identityPoolId: test-identity-pool-id
          gcpServiceAccount: fake-service-account@fake-gcp-project.iam.gserviceaccount.com
Create Topic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Topic(name: string, args?: TopicArgs, opts?: CustomResourceOptions);@overload
def Topic(resource_name: str,
          args: Optional[TopicArgs] = None,
          opts: Optional[ResourceOptions] = None)
@overload
def Topic(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          ingestion_data_source_settings: Optional[TopicIngestionDataSourceSettingsArgs] = None,
          kms_key_name: Optional[str] = None,
          labels: Optional[Mapping[str, str]] = None,
          message_retention_duration: Optional[str] = None,
          message_storage_policy: Optional[TopicMessageStoragePolicyArgs] = None,
          name: Optional[str] = None,
          project: Optional[str] = None,
          schema_settings: Optional[TopicSchemaSettingsArgs] = None)func NewTopic(ctx *Context, name string, args *TopicArgs, opts ...ResourceOption) (*Topic, error)public Topic(string name, TopicArgs? args = null, CustomResourceOptions? opts = null)type: gcp:pubsub:Topic
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 TopicArgs
- 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 TopicArgs
- 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 TopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TopicArgs
- 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 gcpTopicResource = new Gcp.PubSub.Topic("gcpTopicResource", new()
{
    IngestionDataSourceSettings = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsArgs
    {
        AwsKinesis = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsAwsKinesisArgs
        {
            AwsRoleArn = "string",
            ConsumerArn = "string",
            GcpServiceAccount = "string",
            StreamArn = "string",
        },
        AwsMsk = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsAwsMskArgs
        {
            AwsRoleArn = "string",
            ClusterArn = "string",
            GcpServiceAccount = "string",
            Topic = "string",
        },
        AzureEventHubs = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsAzureEventHubsArgs
        {
            ClientId = "string",
            EventHub = "string",
            GcpServiceAccount = "string",
            Namespace = "string",
            ResourceGroup = "string",
            SubscriptionId = "string",
            TenantId = "string",
        },
        CloudStorage = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsCloudStorageArgs
        {
            Bucket = "string",
            AvroFormat = null,
            MatchGlob = "string",
            MinimumObjectCreateTime = "string",
            PubsubAvroFormat = null,
            TextFormat = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsCloudStorageTextFormatArgs
            {
                Delimiter = "string",
            },
        },
        ConfluentCloud = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsConfluentCloudArgs
        {
            BootstrapServer = "string",
            GcpServiceAccount = "string",
            IdentityPoolId = "string",
            Topic = "string",
            ClusterId = "string",
        },
        PlatformLogsSettings = new Gcp.PubSub.Inputs.TopicIngestionDataSourceSettingsPlatformLogsSettingsArgs
        {
            Severity = "string",
        },
    },
    KmsKeyName = "string",
    Labels = 
    {
        { "string", "string" },
    },
    MessageRetentionDuration = "string",
    MessageStoragePolicy = new Gcp.PubSub.Inputs.TopicMessageStoragePolicyArgs
    {
        AllowedPersistenceRegions = new[]
        {
            "string",
        },
        EnforceInTransit = false,
    },
    Name = "string",
    Project = "string",
    SchemaSettings = new Gcp.PubSub.Inputs.TopicSchemaSettingsArgs
    {
        Schema = "string",
        Encoding = "string",
    },
});
example, err := pubsub.NewTopic(ctx, "gcpTopicResource", &pubsub.TopicArgs{
	IngestionDataSourceSettings: &pubsub.TopicIngestionDataSourceSettingsArgs{
		AwsKinesis: &pubsub.TopicIngestionDataSourceSettingsAwsKinesisArgs{
			AwsRoleArn:        pulumi.String("string"),
			ConsumerArn:       pulumi.String("string"),
			GcpServiceAccount: pulumi.String("string"),
			StreamArn:         pulumi.String("string"),
		},
		AwsMsk: &pubsub.TopicIngestionDataSourceSettingsAwsMskArgs{
			AwsRoleArn:        pulumi.String("string"),
			ClusterArn:        pulumi.String("string"),
			GcpServiceAccount: pulumi.String("string"),
			Topic:             pulumi.String("string"),
		},
		AzureEventHubs: &pubsub.TopicIngestionDataSourceSettingsAzureEventHubsArgs{
			ClientId:          pulumi.String("string"),
			EventHub:          pulumi.String("string"),
			GcpServiceAccount: pulumi.String("string"),
			Namespace:         pulumi.String("string"),
			ResourceGroup:     pulumi.String("string"),
			SubscriptionId:    pulumi.String("string"),
			TenantId:          pulumi.String("string"),
		},
		CloudStorage: &pubsub.TopicIngestionDataSourceSettingsCloudStorageArgs{
			Bucket:                  pulumi.String("string"),
			AvroFormat:              &pubsub.TopicIngestionDataSourceSettingsCloudStorageAvroFormatArgs{},
			MatchGlob:               pulumi.String("string"),
			MinimumObjectCreateTime: pulumi.String("string"),
			PubsubAvroFormat:        &pubsub.TopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatArgs{},
			TextFormat: &pubsub.TopicIngestionDataSourceSettingsCloudStorageTextFormatArgs{
				Delimiter: pulumi.String("string"),
			},
		},
		ConfluentCloud: &pubsub.TopicIngestionDataSourceSettingsConfluentCloudArgs{
			BootstrapServer:   pulumi.String("string"),
			GcpServiceAccount: pulumi.String("string"),
			IdentityPoolId:    pulumi.String("string"),
			Topic:             pulumi.String("string"),
			ClusterId:         pulumi.String("string"),
		},
		PlatformLogsSettings: &pubsub.TopicIngestionDataSourceSettingsPlatformLogsSettingsArgs{
			Severity: pulumi.String("string"),
		},
	},
	KmsKeyName: pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	MessageRetentionDuration: pulumi.String("string"),
	MessageStoragePolicy: &pubsub.TopicMessageStoragePolicyArgs{
		AllowedPersistenceRegions: pulumi.StringArray{
			pulumi.String("string"),
		},
		EnforceInTransit: pulumi.Bool(false),
	},
	Name:    pulumi.String("string"),
	Project: pulumi.String("string"),
	SchemaSettings: &pubsub.TopicSchemaSettingsArgs{
		Schema:   pulumi.String("string"),
		Encoding: pulumi.String("string"),
	},
})
var gcpTopicResource = new Topic("gcpTopicResource", TopicArgs.builder()
    .ingestionDataSourceSettings(TopicIngestionDataSourceSettingsArgs.builder()
        .awsKinesis(TopicIngestionDataSourceSettingsAwsKinesisArgs.builder()
            .awsRoleArn("string")
            .consumerArn("string")
            .gcpServiceAccount("string")
            .streamArn("string")
            .build())
        .awsMsk(TopicIngestionDataSourceSettingsAwsMskArgs.builder()
            .awsRoleArn("string")
            .clusterArn("string")
            .gcpServiceAccount("string")
            .topic("string")
            .build())
        .azureEventHubs(TopicIngestionDataSourceSettingsAzureEventHubsArgs.builder()
            .clientId("string")
            .eventHub("string")
            .gcpServiceAccount("string")
            .namespace("string")
            .resourceGroup("string")
            .subscriptionId("string")
            .tenantId("string")
            .build())
        .cloudStorage(TopicIngestionDataSourceSettingsCloudStorageArgs.builder()
            .bucket("string")
            .avroFormat()
            .matchGlob("string")
            .minimumObjectCreateTime("string")
            .pubsubAvroFormat()
            .textFormat(TopicIngestionDataSourceSettingsCloudStorageTextFormatArgs.builder()
                .delimiter("string")
                .build())
            .build())
        .confluentCloud(TopicIngestionDataSourceSettingsConfluentCloudArgs.builder()
            .bootstrapServer("string")
            .gcpServiceAccount("string")
            .identityPoolId("string")
            .topic("string")
            .clusterId("string")
            .build())
        .platformLogsSettings(TopicIngestionDataSourceSettingsPlatformLogsSettingsArgs.builder()
            .severity("string")
            .build())
        .build())
    .kmsKeyName("string")
    .labels(Map.of("string", "string"))
    .messageRetentionDuration("string")
    .messageStoragePolicy(TopicMessageStoragePolicyArgs.builder()
        .allowedPersistenceRegions("string")
        .enforceInTransit(false)
        .build())
    .name("string")
    .project("string")
    .schemaSettings(TopicSchemaSettingsArgs.builder()
        .schema("string")
        .encoding("string")
        .build())
    .build());
gcp_topic_resource = gcp.pubsub.Topic("gcpTopicResource",
    ingestion_data_source_settings={
        "aws_kinesis": {
            "aws_role_arn": "string",
            "consumer_arn": "string",
            "gcp_service_account": "string",
            "stream_arn": "string",
        },
        "aws_msk": {
            "aws_role_arn": "string",
            "cluster_arn": "string",
            "gcp_service_account": "string",
            "topic": "string",
        },
        "azure_event_hubs": {
            "client_id": "string",
            "event_hub": "string",
            "gcp_service_account": "string",
            "namespace": "string",
            "resource_group": "string",
            "subscription_id": "string",
            "tenant_id": "string",
        },
        "cloud_storage": {
            "bucket": "string",
            "avro_format": {},
            "match_glob": "string",
            "minimum_object_create_time": "string",
            "pubsub_avro_format": {},
            "text_format": {
                "delimiter": "string",
            },
        },
        "confluent_cloud": {
            "bootstrap_server": "string",
            "gcp_service_account": "string",
            "identity_pool_id": "string",
            "topic": "string",
            "cluster_id": "string",
        },
        "platform_logs_settings": {
            "severity": "string",
        },
    },
    kms_key_name="string",
    labels={
        "string": "string",
    },
    message_retention_duration="string",
    message_storage_policy={
        "allowed_persistence_regions": ["string"],
        "enforce_in_transit": False,
    },
    name="string",
    project="string",
    schema_settings={
        "schema": "string",
        "encoding": "string",
    })
const gcpTopicResource = new gcp.pubsub.Topic("gcpTopicResource", {
    ingestionDataSourceSettings: {
        awsKinesis: {
            awsRoleArn: "string",
            consumerArn: "string",
            gcpServiceAccount: "string",
            streamArn: "string",
        },
        awsMsk: {
            awsRoleArn: "string",
            clusterArn: "string",
            gcpServiceAccount: "string",
            topic: "string",
        },
        azureEventHubs: {
            clientId: "string",
            eventHub: "string",
            gcpServiceAccount: "string",
            namespace: "string",
            resourceGroup: "string",
            subscriptionId: "string",
            tenantId: "string",
        },
        cloudStorage: {
            bucket: "string",
            avroFormat: {},
            matchGlob: "string",
            minimumObjectCreateTime: "string",
            pubsubAvroFormat: {},
            textFormat: {
                delimiter: "string",
            },
        },
        confluentCloud: {
            bootstrapServer: "string",
            gcpServiceAccount: "string",
            identityPoolId: "string",
            topic: "string",
            clusterId: "string",
        },
        platformLogsSettings: {
            severity: "string",
        },
    },
    kmsKeyName: "string",
    labels: {
        string: "string",
    },
    messageRetentionDuration: "string",
    messageStoragePolicy: {
        allowedPersistenceRegions: ["string"],
        enforceInTransit: false,
    },
    name: "string",
    project: "string",
    schemaSettings: {
        schema: "string",
        encoding: "string",
    },
});
type: gcp:pubsub:Topic
properties:
    ingestionDataSourceSettings:
        awsKinesis:
            awsRoleArn: string
            consumerArn: string
            gcpServiceAccount: string
            streamArn: string
        awsMsk:
            awsRoleArn: string
            clusterArn: string
            gcpServiceAccount: string
            topic: string
        azureEventHubs:
            clientId: string
            eventHub: string
            gcpServiceAccount: string
            namespace: string
            resourceGroup: string
            subscriptionId: string
            tenantId: string
        cloudStorage:
            avroFormat: {}
            bucket: string
            matchGlob: string
            minimumObjectCreateTime: string
            pubsubAvroFormat: {}
            textFormat:
                delimiter: string
        confluentCloud:
            bootstrapServer: string
            clusterId: string
            gcpServiceAccount: string
            identityPoolId: string
            topic: string
        platformLogsSettings:
            severity: string
    kmsKeyName: string
    labels:
        string: string
    messageRetentionDuration: string
    messageStoragePolicy:
        allowedPersistenceRegions:
            - string
        enforceInTransit: false
    name: string
    project: string
    schemaSettings:
        encoding: string
        schema: string
Topic Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Topic resource accepts the following input properties:
- IngestionData TopicSource Settings Ingestion Data Source Settings 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- KmsKey stringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- Labels Dictionary<string, string>
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- MessageRetention stringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- MessageStorage TopicPolicy Message Storage Policy 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- Name string
- Name of the topic.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- SchemaSettings TopicSchema Settings 
- Settings for validating messages published against a schema. Structure is documented below.
- IngestionData TopicSource Settings Ingestion Data Source Settings Args 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- KmsKey stringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- Labels map[string]string
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- MessageRetention stringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- MessageStorage TopicPolicy Message Storage Policy Args 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- Name string
- Name of the topic.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- SchemaSettings TopicSchema Settings Args 
- Settings for validating messages published against a schema. Structure is documented below.
- ingestionData TopicSource Settings Ingestion Data Source Settings 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- kmsKey StringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- labels Map<String,String>
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- messageRetention StringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- messageStorage TopicPolicy Message Storage Policy 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- name String
- Name of the topic.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- schemaSettings TopicSchema Settings 
- Settings for validating messages published against a schema. Structure is documented below.
- ingestionData TopicSource Settings Ingestion Data Source Settings 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- kmsKey stringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- labels {[key: string]: string}
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- messageRetention stringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- messageStorage TopicPolicy Message Storage Policy 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- name string
- Name of the topic.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- schemaSettings TopicSchema Settings 
- Settings for validating messages published against a schema. Structure is documented below.
- ingestion_data_ Topicsource_ settings Ingestion Data Source Settings Args 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- kms_key_ strname 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- labels Mapping[str, str]
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- message_retention_ strduration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- message_storage_ Topicpolicy Message Storage Policy Args 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- name str
- Name of the topic.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- schema_settings TopicSchema Settings Args 
- Settings for validating messages published against a schema. Structure is documented below.
- ingestionData Property MapSource Settings 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- kmsKey StringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- labels Map<String>
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- messageRetention StringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- messageStorage Property MapPolicy 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- name String
- Name of the topic.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- schemaSettings Property Map
- Settings for validating messages published against a schema. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Topic resource produces the following output properties:
- EffectiveLabels Dictionary<string, string>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- PulumiLabels Dictionary<string, string>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- EffectiveLabels map[string]string
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- PulumiLabels map[string]string
- The combination of labels configured directly on the resource and default labels configured on the provider.
- effectiveLabels Map<String,String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumiLabels Map<String,String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- effectiveLabels {[key: string]: string}
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumiLabels {[key: string]: string}
- The combination of labels configured directly on the resource and default labels configured on the provider.
- effective_labels Mapping[str, str]
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- pulumi_labels Mapping[str, str]
- The combination of labels configured directly on the resource and default labels configured on the provider.
- effectiveLabels Map<String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumiLabels Map<String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
Look up Existing Topic Resource
Get an existing Topic 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?: TopicState, opts?: CustomResourceOptions): Topic@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        ingestion_data_source_settings: Optional[TopicIngestionDataSourceSettingsArgs] = None,
        kms_key_name: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        message_retention_duration: Optional[str] = None,
        message_storage_policy: Optional[TopicMessageStoragePolicyArgs] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        schema_settings: Optional[TopicSchemaSettingsArgs] = None) -> Topicfunc GetTopic(ctx *Context, name string, id IDInput, state *TopicState, opts ...ResourceOption) (*Topic, error)public static Topic Get(string name, Input<string> id, TopicState? state, CustomResourceOptions? opts = null)public static Topic get(String name, Output<String> id, TopicState state, CustomResourceOptions options)resources:  _:    type: gcp:pubsub:Topic    get:      id: ${id}- 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.
- EffectiveLabels Dictionary<string, string>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- IngestionData TopicSource Settings Ingestion Data Source Settings 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- KmsKey stringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- Labels Dictionary<string, string>
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- MessageRetention stringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- MessageStorage TopicPolicy Message Storage Policy 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- Name string
- Name of the topic.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- PulumiLabels Dictionary<string, string>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- SchemaSettings TopicSchema Settings 
- Settings for validating messages published against a schema. Structure is documented below.
- EffectiveLabels map[string]string
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- IngestionData TopicSource Settings Ingestion Data Source Settings Args 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- KmsKey stringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- Labels map[string]string
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- MessageRetention stringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- MessageStorage TopicPolicy Message Storage Policy Args 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- Name string
- Name of the topic.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- PulumiLabels map[string]string
- The combination of labels configured directly on the resource and default labels configured on the provider.
- SchemaSettings TopicSchema Settings Args 
- Settings for validating messages published against a schema. Structure is documented below.
- effectiveLabels Map<String,String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- ingestionData TopicSource Settings Ingestion Data Source Settings 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- kmsKey StringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- labels Map<String,String>
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- messageRetention StringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- messageStorage TopicPolicy Message Storage Policy 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- name String
- Name of the topic.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels Map<String,String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- schemaSettings TopicSchema Settings 
- Settings for validating messages published against a schema. Structure is documented below.
- effectiveLabels {[key: string]: string}
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- ingestionData TopicSource Settings Ingestion Data Source Settings 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- kmsKey stringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- labels {[key: string]: string}
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- messageRetention stringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- messageStorage TopicPolicy Message Storage Policy 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- name string
- Name of the topic.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels {[key: string]: string}
- The combination of labels configured directly on the resource and default labels configured on the provider.
- schemaSettings TopicSchema Settings 
- Settings for validating messages published against a schema. Structure is documented below.
- 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.
- ingestion_data_ Topicsource_ settings Ingestion Data Source Settings Args 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- kms_key_ strname 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- labels Mapping[str, str]
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- message_retention_ strduration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- message_storage_ Topicpolicy Message Storage Policy Args 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- name str
- Name of the topic.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_labels Mapping[str, str]
- The combination of labels configured directly on the resource and default labels configured on the provider.
- schema_settings TopicSchema Settings Args 
- Settings for validating messages published against a schema. Structure is documented below.
- effectiveLabels Map<String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- ingestionData Property MapSource Settings 
- Settings for ingestion from a data source into this topic. Structure is documented below.
- kmsKey StringName 
- The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project's PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must haveroles/cloudkms.cryptoKeyEncrypterDecrypterto use this feature. The expected format isprojects/*/locations/*/keyRings/*/cryptoKeys/*
- labels Map<String>
- A set of key/value label pairs to assign to this Topic. - Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field - effective_labelsfor all of the labels present on the resource.
- messageRetention StringDuration 
- Indicates the minimum duration to retain a message after it is published
to the topic. If this field is set, messages published to the topic in
the last messageRetentionDuration are always available to subscribers.
For instance, it allows any attached subscription to seek to a timestamp
that is up to messageRetentionDuration in the past. If this field is not
set, message retention is controlled by settings on individual subscriptions.
The rotation period has the format of a decimal number, followed by the
letter s(seconds). Cannot be more than 31 days or less than 10 minutes.
- messageStorage Property MapPolicy 
- Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
- name String
- Name of the topic.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels Map<String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- schemaSettings Property Map
- Settings for validating messages published against a schema. Structure is documented below.
Supporting Types
TopicIngestionDataSourceSettings, TopicIngestionDataSourceSettingsArgs          
- AwsKinesis TopicIngestion Data Source Settings Aws Kinesis 
- Settings for ingestion from Amazon Kinesis Data Streams. Structure is documented below.
- AwsMsk TopicIngestion Data Source Settings Aws Msk 
- Settings for ingestion from Amazon Managed Streaming for Apache Kafka. Structure is documented below.
- AzureEvent TopicHubs Ingestion Data Source Settings Azure Event Hubs 
- Settings for ingestion from Azure Event Hubs. Structure is documented below.
- CloudStorage TopicIngestion Data Source Settings Cloud Storage 
- Settings for ingestion from Cloud Storage. Structure is documented below.
- ConfluentCloud TopicIngestion Data Source Settings Confluent Cloud 
- Settings for ingestion from Confluent Cloud. Structure is documented below.
- PlatformLogs TopicSettings Ingestion Data Source Settings Platform Logs Settings 
- Settings for Platform Logs regarding ingestion to Pub/Sub. If unset, no Platform Logs will be generated.' Structure is documented below.
- AwsKinesis TopicIngestion Data Source Settings Aws Kinesis 
- Settings for ingestion from Amazon Kinesis Data Streams. Structure is documented below.
- AwsMsk TopicIngestion Data Source Settings Aws Msk 
- Settings for ingestion from Amazon Managed Streaming for Apache Kafka. Structure is documented below.
- AzureEvent TopicHubs Ingestion Data Source Settings Azure Event Hubs 
- Settings for ingestion from Azure Event Hubs. Structure is documented below.
- CloudStorage TopicIngestion Data Source Settings Cloud Storage 
- Settings for ingestion from Cloud Storage. Structure is documented below.
- ConfluentCloud TopicIngestion Data Source Settings Confluent Cloud 
- Settings for ingestion from Confluent Cloud. Structure is documented below.
- PlatformLogs TopicSettings Ingestion Data Source Settings Platform Logs Settings 
- Settings for Platform Logs regarding ingestion to Pub/Sub. If unset, no Platform Logs will be generated.' Structure is documented below.
- awsKinesis TopicIngestion Data Source Settings Aws Kinesis 
- Settings for ingestion from Amazon Kinesis Data Streams. Structure is documented below.
- awsMsk TopicIngestion Data Source Settings Aws Msk 
- Settings for ingestion from Amazon Managed Streaming for Apache Kafka. Structure is documented below.
- azureEvent TopicHubs Ingestion Data Source Settings Azure Event Hubs 
- Settings for ingestion from Azure Event Hubs. Structure is documented below.
- cloudStorage TopicIngestion Data Source Settings Cloud Storage 
- Settings for ingestion from Cloud Storage. Structure is documented below.
- confluentCloud TopicIngestion Data Source Settings Confluent Cloud 
- Settings for ingestion from Confluent Cloud. Structure is documented below.
- platformLogs TopicSettings Ingestion Data Source Settings Platform Logs Settings 
- Settings for Platform Logs regarding ingestion to Pub/Sub. If unset, no Platform Logs will be generated.' Structure is documented below.
- awsKinesis TopicIngestion Data Source Settings Aws Kinesis 
- Settings for ingestion from Amazon Kinesis Data Streams. Structure is documented below.
- awsMsk TopicIngestion Data Source Settings Aws Msk 
- Settings for ingestion from Amazon Managed Streaming for Apache Kafka. Structure is documented below.
- azureEvent TopicHubs Ingestion Data Source Settings Azure Event Hubs 
- Settings for ingestion from Azure Event Hubs. Structure is documented below.
- cloudStorage TopicIngestion Data Source Settings Cloud Storage 
- Settings for ingestion from Cloud Storage. Structure is documented below.
- confluentCloud TopicIngestion Data Source Settings Confluent Cloud 
- Settings for ingestion from Confluent Cloud. Structure is documented below.
- platformLogs TopicSettings Ingestion Data Source Settings Platform Logs Settings 
- Settings for Platform Logs regarding ingestion to Pub/Sub. If unset, no Platform Logs will be generated.' Structure is documented below.
- aws_kinesis TopicIngestion Data Source Settings Aws Kinesis 
- Settings for ingestion from Amazon Kinesis Data Streams. Structure is documented below.
- aws_msk TopicIngestion Data Source Settings Aws Msk 
- Settings for ingestion from Amazon Managed Streaming for Apache Kafka. Structure is documented below.
- azure_event_ Topichubs Ingestion Data Source Settings Azure Event Hubs 
- Settings for ingestion from Azure Event Hubs. Structure is documented below.
- cloud_storage TopicIngestion Data Source Settings Cloud Storage 
- Settings for ingestion from Cloud Storage. Structure is documented below.
- confluent_cloud TopicIngestion Data Source Settings Confluent Cloud 
- Settings for ingestion from Confluent Cloud. Structure is documented below.
- platform_logs_ Topicsettings Ingestion Data Source Settings Platform Logs Settings 
- Settings for Platform Logs regarding ingestion to Pub/Sub. If unset, no Platform Logs will be generated.' Structure is documented below.
- awsKinesis Property Map
- Settings for ingestion from Amazon Kinesis Data Streams. Structure is documented below.
- awsMsk Property Map
- Settings for ingestion from Amazon Managed Streaming for Apache Kafka. Structure is documented below.
- azureEvent Property MapHubs 
- Settings for ingestion from Azure Event Hubs. Structure is documented below.
- cloudStorage Property Map
- Settings for ingestion from Cloud Storage. Structure is documented below.
- confluentCloud Property Map
- Settings for ingestion from Confluent Cloud. Structure is documented below.
- platformLogs Property MapSettings 
- Settings for Platform Logs regarding ingestion to Pub/Sub. If unset, no Platform Logs will be generated.' Structure is documented below.
TopicIngestionDataSourceSettingsAwsKinesis, TopicIngestionDataSourceSettingsAwsKinesisArgs              
- AwsRole stringArn 
- AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- ConsumerArn string
- The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.
- GcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication
with Kinesis (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- StreamArn string
- The Kinesis stream ARN to ingest data from.
- AwsRole stringArn 
- AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- ConsumerArn string
- The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.
- GcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication
with Kinesis (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- StreamArn string
- The Kinesis stream ARN to ingest data from.
- awsRole StringArn 
- AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- consumerArn String
- The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.
- gcpService StringAccount 
- The GCP service account to be used for Federated Identity authentication
with Kinesis (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- streamArn String
- The Kinesis stream ARN to ingest data from.
- awsRole stringArn 
- AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- consumerArn string
- The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.
- gcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication
with Kinesis (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- streamArn string
- The Kinesis stream ARN to ingest data from.
- aws_role_ strarn 
- AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- consumer_arn str
- The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.
- gcp_service_ straccount 
- The GCP service account to be used for Federated Identity authentication
with Kinesis (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- stream_arn str
- The Kinesis stream ARN to ingest data from.
- awsRole StringArn 
- AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- consumerArn String
- The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.
- gcpService StringAccount 
- The GCP service account to be used for Federated Identity authentication
with Kinesis (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- streamArn String
- The Kinesis stream ARN to ingest data from.
TopicIngestionDataSourceSettingsAwsMsk, TopicIngestionDataSourceSettingsAwsMskArgs              
- AwsRole stringArn 
- AWS role ARN to be used for Federated Identity authentication with MSK. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- ClusterArn string
- ARN that uniquely identifies the MSK cluster.
- GcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication
with MSK (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- Topic string
- The name of the MSK topic that Pub/Sub will import from.
- AwsRole stringArn 
- AWS role ARN to be used for Federated Identity authentication with MSK. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- ClusterArn string
- ARN that uniquely identifies the MSK cluster.
- GcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication
with MSK (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- Topic string
- The name of the MSK topic that Pub/Sub will import from.
- awsRole StringArn 
- AWS role ARN to be used for Federated Identity authentication with MSK. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- clusterArn String
- ARN that uniquely identifies the MSK cluster.
- gcpService StringAccount 
- The GCP service account to be used for Federated Identity authentication
with MSK (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- topic String
- The name of the MSK topic that Pub/Sub will import from.
- awsRole stringArn 
- AWS role ARN to be used for Federated Identity authentication with MSK. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- clusterArn string
- ARN that uniquely identifies the MSK cluster.
- gcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication
with MSK (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- topic string
- The name of the MSK topic that Pub/Sub will import from.
- aws_role_ strarn 
- AWS role ARN to be used for Federated Identity authentication with MSK. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- cluster_arn str
- ARN that uniquely identifies the MSK cluster.
- gcp_service_ straccount 
- The GCP service account to be used for Federated Identity authentication
with MSK (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- topic str
- The name of the MSK topic that Pub/Sub will import from.
- awsRole StringArn 
- AWS role ARN to be used for Federated Identity authentication with MSK. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.
- clusterArn String
- ARN that uniquely identifies the MSK cluster.
- gcpService StringAccount 
- The GCP service account to be used for Federated Identity authentication
with MSK (via a AssumeRoleWithWebIdentitycall for the provided role). TheawsRoleArnmust be set up withaccounts.google.com:subequals to this service account number.
- topic String
- The name of the MSK topic that Pub/Sub will import from.
TopicIngestionDataSourceSettingsAzureEventHubs, TopicIngestionDataSourceSettingsAzureEventHubsArgs                
- ClientId string
- The Azure event hub client ID to use for ingestion.
- EventHub string
- The Azure event hub to ingest data from.
- GcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication
with Azure (via a AssumeRoleWithWebIdentitycall for the provided role).
- Namespace string
- The Azure event hub namespace to ingest data from.
- ResourceGroup string
- The name of the resource group within an Azure subscription.
- SubscriptionId string
- The Azure event hub subscription ID to use for ingestion.
- TenantId string
- The Azure event hub tenant ID to use for ingestion.
- ClientId string
- The Azure event hub client ID to use for ingestion.
- EventHub string
- The Azure event hub to ingest data from.
- GcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication
with Azure (via a AssumeRoleWithWebIdentitycall for the provided role).
- Namespace string
- The Azure event hub namespace to ingest data from.
- ResourceGroup string
- The name of the resource group within an Azure subscription.
- SubscriptionId string
- The Azure event hub subscription ID to use for ingestion.
- TenantId string
- The Azure event hub tenant ID to use for ingestion.
- clientId String
- The Azure event hub client ID to use for ingestion.
- eventHub String
- The Azure event hub to ingest data from.
- gcpService StringAccount 
- The GCP service account to be used for Federated Identity authentication
with Azure (via a AssumeRoleWithWebIdentitycall for the provided role).
- namespace String
- The Azure event hub namespace to ingest data from.
- resourceGroup String
- The name of the resource group within an Azure subscription.
- subscriptionId String
- The Azure event hub subscription ID to use for ingestion.
- tenantId String
- The Azure event hub tenant ID to use for ingestion.
- clientId string
- The Azure event hub client ID to use for ingestion.
- eventHub string
- The Azure event hub to ingest data from.
- gcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication
with Azure (via a AssumeRoleWithWebIdentitycall for the provided role).
- namespace string
- The Azure event hub namespace to ingest data from.
- resourceGroup string
- The name of the resource group within an Azure subscription.
- subscriptionId string
- The Azure event hub subscription ID to use for ingestion.
- tenantId string
- The Azure event hub tenant ID to use for ingestion.
- client_id str
- The Azure event hub client ID to use for ingestion.
- event_hub str
- The Azure event hub to ingest data from.
- gcp_service_ straccount 
- The GCP service account to be used for Federated Identity authentication
with Azure (via a AssumeRoleWithWebIdentitycall for the provided role).
- namespace str
- The Azure event hub namespace to ingest data from.
- resource_group str
- The name of the resource group within an Azure subscription.
- subscription_id str
- The Azure event hub subscription ID to use for ingestion.
- tenant_id str
- The Azure event hub tenant ID to use for ingestion.
- clientId String
- The Azure event hub client ID to use for ingestion.
- eventHub String
- The Azure event hub to ingest data from.
- gcpService StringAccount 
- The GCP service account to be used for Federated Identity authentication
with Azure (via a AssumeRoleWithWebIdentitycall for the provided role).
- namespace String
- The Azure event hub namespace to ingest data from.
- resourceGroup String
- The name of the resource group within an Azure subscription.
- subscriptionId String
- The Azure event hub subscription ID to use for ingestion.
- tenantId String
- The Azure event hub tenant ID to use for ingestion.
TopicIngestionDataSourceSettingsCloudStorage, TopicIngestionDataSourceSettingsCloudStorageArgs              
- Bucket string
- Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the bucket naming requirements: https://cloud.google.com/storage/docs/buckets#naming.
- AvroFormat TopicIngestion Data Source Settings Cloud Storage Avro Format 
- Configuration for reading Cloud Storage data in Avro binary format. The
bytes of each object will be set to the datafield of a Pub/Sub message.
- MatchGlob string
- Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the supported patterns: https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob
- MinimumObject stringCreate Time 
- The timestamp set in RFC3339 text format. If set, only objects with a larger or equal timestamp will be ingested. Unset by default, meaning all objects will be ingested.
- PubsubAvro TopicFormat Ingestion Data Source Settings Cloud Storage Pubsub Avro Format 
- Configuration for reading Cloud Storage data written via Cloud Storage subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
- TextFormat TopicIngestion Data Source Settings Cloud Storage Text Format 
- Configuration for reading Cloud Storage data in text format. Each line of
text as specified by the delimiter will be set to the datafield of a Pub/Sub message. Structure is documented below.
- Bucket string
- Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the bucket naming requirements: https://cloud.google.com/storage/docs/buckets#naming.
- AvroFormat TopicIngestion Data Source Settings Cloud Storage Avro Format 
- Configuration for reading Cloud Storage data in Avro binary format. The
bytes of each object will be set to the datafield of a Pub/Sub message.
- MatchGlob string
- Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the supported patterns: https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob
- MinimumObject stringCreate Time 
- The timestamp set in RFC3339 text format. If set, only objects with a larger or equal timestamp will be ingested. Unset by default, meaning all objects will be ingested.
- PubsubAvro TopicFormat Ingestion Data Source Settings Cloud Storage Pubsub Avro Format 
- Configuration for reading Cloud Storage data written via Cloud Storage subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
- TextFormat TopicIngestion Data Source Settings Cloud Storage Text Format 
- Configuration for reading Cloud Storage data in text format. Each line of
text as specified by the delimiter will be set to the datafield of a Pub/Sub message. Structure is documented below.
- bucket String
- Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the bucket naming requirements: https://cloud.google.com/storage/docs/buckets#naming.
- avroFormat TopicIngestion Data Source Settings Cloud Storage Avro Format 
- Configuration for reading Cloud Storage data in Avro binary format. The
bytes of each object will be set to the datafield of a Pub/Sub message.
- matchGlob String
- Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the supported patterns: https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob
- minimumObject StringCreate Time 
- The timestamp set in RFC3339 text format. If set, only objects with a larger or equal timestamp will be ingested. Unset by default, meaning all objects will be ingested.
- pubsubAvro TopicFormat Ingestion Data Source Settings Cloud Storage Pubsub Avro Format 
- Configuration for reading Cloud Storage data written via Cloud Storage subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
- textFormat TopicIngestion Data Source Settings Cloud Storage Text Format 
- Configuration for reading Cloud Storage data in text format. Each line of
text as specified by the delimiter will be set to the datafield of a Pub/Sub message. Structure is documented below.
- bucket string
- Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the bucket naming requirements: https://cloud.google.com/storage/docs/buckets#naming.
- avroFormat TopicIngestion Data Source Settings Cloud Storage Avro Format 
- Configuration for reading Cloud Storage data in Avro binary format. The
bytes of each object will be set to the datafield of a Pub/Sub message.
- matchGlob string
- Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the supported patterns: https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob
- minimumObject stringCreate Time 
- The timestamp set in RFC3339 text format. If set, only objects with a larger or equal timestamp will be ingested. Unset by default, meaning all objects will be ingested.
- pubsubAvro TopicFormat Ingestion Data Source Settings Cloud Storage Pubsub Avro Format 
- Configuration for reading Cloud Storage data written via Cloud Storage subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
- textFormat TopicIngestion Data Source Settings Cloud Storage Text Format 
- Configuration for reading Cloud Storage data in text format. Each line of
text as specified by the delimiter will be set to the datafield of a Pub/Sub message. Structure is documented below.
- bucket str
- Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the bucket naming requirements: https://cloud.google.com/storage/docs/buckets#naming.
- avro_format TopicIngestion Data Source Settings Cloud Storage Avro Format 
- Configuration for reading Cloud Storage data in Avro binary format. The
bytes of each object will be set to the datafield of a Pub/Sub message.
- match_glob str
- Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the supported patterns: https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob
- minimum_object_ strcreate_ time 
- The timestamp set in RFC3339 text format. If set, only objects with a larger or equal timestamp will be ingested. Unset by default, meaning all objects will be ingested.
- pubsub_avro_ Topicformat Ingestion Data Source Settings Cloud Storage Pubsub Avro Format 
- Configuration for reading Cloud Storage data written via Cloud Storage subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
- text_format TopicIngestion Data Source Settings Cloud Storage Text Format 
- Configuration for reading Cloud Storage data in text format. Each line of
text as specified by the delimiter will be set to the datafield of a Pub/Sub message. Structure is documented below.
- bucket String
- Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the bucket naming requirements: https://cloud.google.com/storage/docs/buckets#naming.
- avroFormat Property Map
- Configuration for reading Cloud Storage data in Avro binary format. The
bytes of each object will be set to the datafield of a Pub/Sub message.
- matchGlob String
- Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the supported patterns: https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob
- minimumObject StringCreate Time 
- The timestamp set in RFC3339 text format. If set, only objects with a larger or equal timestamp will be ingested. Unset by default, meaning all objects will be ingested.
- pubsubAvro Property MapFormat 
- Configuration for reading Cloud Storage data written via Cloud Storage subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
- textFormat Property Map
- Configuration for reading Cloud Storage data in text format. Each line of
text as specified by the delimiter will be set to the datafield of a Pub/Sub message. Structure is documented below.
TopicIngestionDataSourceSettingsCloudStorageTextFormat, TopicIngestionDataSourceSettingsCloudStorageTextFormatArgs                  
- Delimiter string
- The delimiter to use when using the 'text' format. Each line of text as specified by the delimiter will be set to the 'data' field of a Pub/Sub message. When unset, '\n' is used.
- Delimiter string
- The delimiter to use when using the 'text' format. Each line of text as specified by the delimiter will be set to the 'data' field of a Pub/Sub message. When unset, '\n' is used.
- delimiter String
- The delimiter to use when using the 'text' format. Each line of text as specified by the delimiter will be set to the 'data' field of a Pub/Sub message. When unset, '\n' is used.
- delimiter string
- The delimiter to use when using the 'text' format. Each line of text as specified by the delimiter will be set to the 'data' field of a Pub/Sub message. When unset, '\n' is used.
- delimiter str
- The delimiter to use when using the 'text' format. Each line of text as specified by the delimiter will be set to the 'data' field of a Pub/Sub message. When unset, '\n' is used.
- delimiter String
- The delimiter to use when using the 'text' format. Each line of text as specified by the delimiter will be set to the 'data' field of a Pub/Sub message. When unset, '\n' is used.
TopicIngestionDataSourceSettingsConfluentCloud, TopicIngestionDataSourceSettingsConfluentCloudArgs              
- BootstrapServer string
- The Confluent Cloud bootstrap server. The format is url:port.
- GcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication with Confluent Cloud.
- IdentityPool stringId 
- Identity pool ID to be used for Federated Identity authentication with Confluent Cloud.
- Topic string
- Name of the Confluent Cloud topic that Pub/Sub will import from.
- ClusterId string
- The Confluent Cloud cluster ID.
- BootstrapServer string
- The Confluent Cloud bootstrap server. The format is url:port.
- GcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication with Confluent Cloud.
- IdentityPool stringId 
- Identity pool ID to be used for Federated Identity authentication with Confluent Cloud.
- Topic string
- Name of the Confluent Cloud topic that Pub/Sub will import from.
- ClusterId string
- The Confluent Cloud cluster ID.
- bootstrapServer String
- The Confluent Cloud bootstrap server. The format is url:port.
- gcpService StringAccount 
- The GCP service account to be used for Federated Identity authentication with Confluent Cloud.
- identityPool StringId 
- Identity pool ID to be used for Federated Identity authentication with Confluent Cloud.
- topic String
- Name of the Confluent Cloud topic that Pub/Sub will import from.
- clusterId String
- The Confluent Cloud cluster ID.
- bootstrapServer string
- The Confluent Cloud bootstrap server. The format is url:port.
- gcpService stringAccount 
- The GCP service account to be used for Federated Identity authentication with Confluent Cloud.
- identityPool stringId 
- Identity pool ID to be used for Federated Identity authentication with Confluent Cloud.
- topic string
- Name of the Confluent Cloud topic that Pub/Sub will import from.
- clusterId string
- The Confluent Cloud cluster ID.
- bootstrap_server str
- The Confluent Cloud bootstrap server. The format is url:port.
- gcp_service_ straccount 
- The GCP service account to be used for Federated Identity authentication with Confluent Cloud.
- identity_pool_ strid 
- Identity pool ID to be used for Federated Identity authentication with Confluent Cloud.
- topic str
- Name of the Confluent Cloud topic that Pub/Sub will import from.
- cluster_id str
- The Confluent Cloud cluster ID.
- bootstrapServer String
- The Confluent Cloud bootstrap server. The format is url:port.
- gcpService StringAccount 
- The GCP service account to be used for Federated Identity authentication with Confluent Cloud.
- identityPool StringId 
- Identity pool ID to be used for Federated Identity authentication with Confluent Cloud.
- topic String
- Name of the Confluent Cloud topic that Pub/Sub will import from.
- clusterId String
- The Confluent Cloud cluster ID.
TopicIngestionDataSourceSettingsPlatformLogsSettings, TopicIngestionDataSourceSettingsPlatformLogsSettingsArgs                
- Severity string
- The minimum severity level of Platform Logs that will be written. If unspecified,
no Platform Logs will be written.
Default value is SEVERITY_UNSPECIFIED. Possible values are:SEVERITY_UNSPECIFIED,DISABLED,DEBUG,INFO,WARNING,ERROR.
- Severity string
- The minimum severity level of Platform Logs that will be written. If unspecified,
no Platform Logs will be written.
Default value is SEVERITY_UNSPECIFIED. Possible values are:SEVERITY_UNSPECIFIED,DISABLED,DEBUG,INFO,WARNING,ERROR.
- severity String
- The minimum severity level of Platform Logs that will be written. If unspecified,
no Platform Logs will be written.
Default value is SEVERITY_UNSPECIFIED. Possible values are:SEVERITY_UNSPECIFIED,DISABLED,DEBUG,INFO,WARNING,ERROR.
- severity string
- The minimum severity level of Platform Logs that will be written. If unspecified,
no Platform Logs will be written.
Default value is SEVERITY_UNSPECIFIED. Possible values are:SEVERITY_UNSPECIFIED,DISABLED,DEBUG,INFO,WARNING,ERROR.
- severity str
- The minimum severity level of Platform Logs that will be written. If unspecified,
no Platform Logs will be written.
Default value is SEVERITY_UNSPECIFIED. Possible values are:SEVERITY_UNSPECIFIED,DISABLED,DEBUG,INFO,WARNING,ERROR.
- severity String
- The minimum severity level of Platform Logs that will be written. If unspecified,
no Platform Logs will be written.
Default value is SEVERITY_UNSPECIFIED. Possible values are:SEVERITY_UNSPECIFIED,DISABLED,DEBUG,INFO,WARNING,ERROR.
TopicMessageStoragePolicy, TopicMessageStoragePolicyArgs        
- AllowedPersistence List<string>Regions 
- A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- EnforceIn boolTransit 
- If true, allowedPersistenceRegionsis also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail topics.publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowedPersistenceRegions.
- AllowedPersistence []stringRegions 
- A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- EnforceIn boolTransit 
- If true, allowedPersistenceRegionsis also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail topics.publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowedPersistenceRegions.
- allowedPersistence List<String>Regions 
- A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- enforceIn BooleanTransit 
- If true, allowedPersistenceRegionsis also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail topics.publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowedPersistenceRegions.
- allowedPersistence string[]Regions 
- A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- enforceIn booleanTransit 
- If true, allowedPersistenceRegionsis also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail topics.publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowedPersistenceRegions.
- allowed_persistence_ Sequence[str]regions 
- A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- enforce_in_ booltransit 
- If true, allowedPersistenceRegionsis also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail topics.publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowedPersistenceRegions.
- allowedPersistence List<String>Regions 
- A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- enforceIn BooleanTransit 
- If true, allowedPersistenceRegionsis also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail topics.publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowedPersistenceRegions.
TopicSchemaSettings, TopicSchemaSettingsArgs      
- Schema string
- The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be deleted-schema if the schema has been deleted.
- Encoding string
- The encoding of messages validated against schema.
Default value is ENCODING_UNSPECIFIED. Possible values are:ENCODING_UNSPECIFIED,JSON,BINARY.
- Schema string
- The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be deleted-schema if the schema has been deleted.
- Encoding string
- The encoding of messages validated against schema.
Default value is ENCODING_UNSPECIFIED. Possible values are:ENCODING_UNSPECIFIED,JSON,BINARY.
- schema String
- The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be deleted-schema if the schema has been deleted.
- encoding String
- The encoding of messages validated against schema.
Default value is ENCODING_UNSPECIFIED. Possible values are:ENCODING_UNSPECIFIED,JSON,BINARY.
- schema string
- The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be deleted-schema if the schema has been deleted.
- encoding string
- The encoding of messages validated against schema.
Default value is ENCODING_UNSPECIFIED. Possible values are:ENCODING_UNSPECIFIED,JSON,BINARY.
- schema str
- The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be deleted-schema if the schema has been deleted.
- encoding str
- The encoding of messages validated against schema.
Default value is ENCODING_UNSPECIFIED. Possible values are:ENCODING_UNSPECIFIED,JSON,BINARY.
- schema String
- The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be deleted-schema if the schema has been deleted.
- encoding String
- The encoding of messages validated against schema.
Default value is ENCODING_UNSPECIFIED. Possible values are:ENCODING_UNSPECIFIED,JSON,BINARY.
Import
Topic can be imported using any of these accepted formats:
- projects/{{project}}/topics/{{name}}
- {{project}}/{{name}}
- {{name}}
When using the pulumi import command, Topic can be imported using one of the formats above. For example:
$ pulumi import gcp:pubsub/topic:Topic default projects/{{project}}/topics/{{name}}
$ pulumi import gcp:pubsub/topic:Topic default {{project}}/{{name}}
$ pulumi import gcp:pubsub/topic:Topic default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.