@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
316 lines (315 loc) • 13.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A Managed Service for Kafka Connect cluster.
*
* ## Example Usage
*
* ### Managedkafka Connect Cluster Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* import * as time from "@pulumiverse/time";
*
* const project = new gcp.organizations.Project("project", {
* projectId: "tf-test_32706",
* name: "tf-test_49082",
* orgId: "123456789",
* billingAccount: "000000-0000000-0000000-000000",
* deletionPolicy: "DELETE",
* });
* const wait60Seconds = new time.index.Sleep("wait_60_seconds", {createDuration: "60s"}, {
* dependsOn: [project],
* });
* const compute = new gcp.projects.Service("compute", {
* project: project.projectId,
* service: "compute.googleapis.com",
* }, {
* dependsOn: [wait60Seconds],
* });
* const managedkafka = new gcp.projects.Service("managedkafka", {
* project: project.projectId,
* service: "managedkafka.googleapis.com",
* }, {
* dependsOn: [compute],
* });
* const wait120Seconds = new time.index.Sleep("wait_120_seconds", {createDuration: "120s"}, {
* dependsOn: [managedkafka],
* });
* const mkcSecondarySubnet = new gcp.compute.Subnetwork("mkc_secondary_subnet", {
* project: project.projectId,
* name: "my-secondary-subnetwork",
* ipCidrRange: "10.3.0.0/16",
* region: "us-central1",
* network: "default",
* }, {
* dependsOn: [wait120Seconds],
* });
* const gmkCluster = new gcp.managedkafka.Cluster("gmk_cluster", {
* project: project.projectId,
* clusterId: "my-cluster",
* location: "us-central1",
* capacityConfig: {
* vcpuCount: "3",
* memoryBytes: "3221225472",
* },
* gcpConfig: {
* accessConfig: {
* networkConfigs: [{
* subnet: pulumi.interpolate`projects/${project.projectId}/regions/us-central1/subnetworks/default`,
* }],
* },
* },
* }, {
* dependsOn: [managedkafka],
* });
* const example = new gcp.managedkafka.ConnectCluster("example", {
* project: project.projectId,
* connectClusterId: "my-connect-cluster",
* kafkaCluster: pulumi.interpolate`projects/${project.projectId}/locations/us-central1/clusters/${gmkCluster.clusterId}`,
* location: "us-central1",
* capacityConfig: {
* vcpuCount: "12",
* memoryBytes: "21474836480",
* },
* gcpConfig: {
* accessConfig: {
* networkConfigs: [{
* primarySubnet: pulumi.interpolate`projects/${project.projectId}/regions/us-central1/subnetworks/default`,
* additionalSubnets: [mkcSecondarySubnet.id],
* dnsDomainNames: [pulumi.interpolate`${gmkCluster.clusterId}.us-central1.managedkafka.${project.projectId}.cloud.goog`],
* }],
* },
* },
* labels: {
* key: "value",
* },
* }, {
* dependsOn: [managedkafka],
* });
* ```
*
* ## Import
*
* ConnectCluster can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/connectClusters/{{connect_cluster_id}}`
*
* * `{{project}}/{{location}}/{{connect_cluster_id}}`
*
* * `{{location}}/{{connect_cluster_id}}`
*
* When using the `pulumi import` command, ConnectCluster can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:managedkafka/connectCluster:ConnectCluster default projects/{{project}}/locations/{{location}}/connectClusters/{{connect_cluster_id}}
* ```
*
* ```sh
* $ pulumi import gcp:managedkafka/connectCluster:ConnectCluster default {{project}}/{{location}}/{{connect_cluster_id}}
* ```
*
* ```sh
* $ pulumi import gcp:managedkafka/connectCluster:ConnectCluster default {{location}}/{{connect_cluster_id}}
* ```
*/
export declare class ConnectCluster extends pulumi.CustomResource {
/**
* Get an existing ConnectCluster resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ConnectClusterState, opts?: pulumi.CustomResourceOptions): ConnectCluster;
/**
* Returns true if the given object is an instance of ConnectCluster. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ConnectCluster;
/**
* A capacity configuration of a Kafka cluster.
* Structure is documented below.
*/
readonly capacityConfig: pulumi.Output<outputs.managedkafka.ConnectClusterCapacityConfig>;
/**
* The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: `my-connect-cluster-id`.
*/
readonly connectClusterId: pulumi.Output<string>;
/**
* The time when the cluster was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform.
* Structure is documented below.
*/
readonly gcpConfig: pulumi.Output<outputs.managedkafka.ConnectClusterGcpConfig>;
/**
* The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: `projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID`.
*/
readonly kafkaCluster: pulumi.Output<string>;
/**
* List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
*/
readonly location: pulumi.Output<string>;
/**
* The name of the connect cluster. Structured like: `projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER_ID`.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* The current state of the connect cluster. Possible values: `STATE_UNSPECIFIED`, `CREATING`, `ACTIVE`, `DELETING`.
*/
readonly state: pulumi.Output<string>;
/**
* The time when the cluster was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a ConnectCluster resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ConnectClusterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ConnectCluster resources.
*/
export interface ConnectClusterState {
/**
* A capacity configuration of a Kafka cluster.
* Structure is documented below.
*/
capacityConfig?: pulumi.Input<inputs.managedkafka.ConnectClusterCapacityConfig>;
/**
* The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: `my-connect-cluster-id`.
*/
connectClusterId?: pulumi.Input<string>;
/**
* The time when the cluster was created.
*/
createTime?: pulumi.Input<string>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform.
* Structure is documented below.
*/
gcpConfig?: pulumi.Input<inputs.managedkafka.ConnectClusterGcpConfig>;
/**
* The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: `projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID`.
*/
kafkaCluster?: pulumi.Input<string>;
/**
* List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
*/
location?: pulumi.Input<string>;
/**
* The name of the connect cluster. Structured like: `projects/PROJECT_ID/locations/LOCATION/connectClusters/CONNECT_CLUSTER_ID`.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The current state of the connect cluster. Possible values: `STATE_UNSPECIFIED`, `CREATING`, `ACTIVE`, `DELETING`.
*/
state?: pulumi.Input<string>;
/**
* The time when the cluster was last updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ConnectCluster resource.
*/
export interface ConnectClusterArgs {
/**
* A capacity configuration of a Kafka cluster.
* Structure is documented below.
*/
capacityConfig: pulumi.Input<inputs.managedkafka.ConnectClusterCapacityConfig>;
/**
* The ID to use for the Connect Cluster, which will become the final component of the connect cluster's name. This value is structured like: `my-connect-cluster-id`.
*/
connectClusterId: pulumi.Input<string>;
/**
* Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform.
* Structure is documented below.
*/
gcpConfig: pulumi.Input<inputs.managedkafka.ConnectClusterGcpConfig>;
/**
* The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: `projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID`.
*/
kafkaCluster: pulumi.Input<string>;
/**
* List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (-), underscores ( ), lowercase characters, and numbers. Values must contain only hyphens (-), underscores ( ), lowercase characters, and numbers.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* ID of the location of the Kafka Connect resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations.
*/
location: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}