import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * An Integration connectors Connection. * * To get more information about Connection, see: * * * [API documentation](https://cloud.google.com/integration-connectors/docs/reference/rest/v1/projects.locations.connections) * * How-to Guides * * [Official Documentation](https://cloud.google.com/integration-connectors/docs/createconnection) * * ## Example Usage * * ### Integration Connectors Connection Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const testProject = gcp.organizations.getProject({}); * const pubsubconnection = new gcp.integrationconnectors.Connection("pubsubconnection", { * name: "test-pubsub", * location: "us-central1", * connectorVersion: testProject.then(testProject => `projects/${testProject.projectId}/locations/global/providers/gcp/connectors/pubsub/versions/1`), * description: "tf created description", * configVariables: [ * { * key: "project_id", * stringValue: "connectors-example", * }, * { * key: "topic_id", * stringValue: "test", * }, * ], * }); * ``` * ### Integration Connectors Connection Advanced * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const testProject = gcp.organizations.getProject({}); * const secret_basic = new gcp.secretmanager.Secret("secret-basic", { * secretId: "test-secret", * replication: { * userManaged: { * replicas: [{ * location: "us-central1", * }], * }, * }, * }); * const secret_version_basic = new gcp.secretmanager.SecretVersion("secret-version-basic", { * secret: secret_basic.id, * secretData: "dummypassword", * }); * const secretIam = new gcp.secretmanager.SecretIamMember("secret_iam", { * secretId: secret_basic.id, * role: "roles/secretmanager.admin", * member: testProject.then(testProject => `serviceAccount:${testProject.number}-compute@developer.gserviceaccount.com`), * }, { * dependsOn: [secret_version_basic], * }); * const zendeskconnection = new gcp.integrationconnectors.Connection("zendeskconnection", { * name: "test-zendesk", * description: "tf updated description", * location: "us-central1", * serviceAccount: testProject.then(testProject => `${testProject.number}-compute@developer.gserviceaccount.com`), * connectorVersion: testProject.then(testProject => `projects/${testProject.projectId}/locations/global/providers/zendesk/connectors/zendesk/versions/1`), * configVariables: [ * { * key: "proxy_enabled", * booleanValue: false, * }, * { * key: "sample_integer_value", * integerValue: 1, * }, * { * key: "sample_encryption_key_value", * encryptionKeyValue: { * type: "GOOGLE_MANAGED", * kmsKeyName: "sampleKMSKkey", * }, * }, * { * key: "sample_secret_value", * secretValue: { * secretVersion: secret_version_basic.name, * }, * }, * ], * suspended: false, * authConfig: { * additionalVariables: [ * { * key: "sample_string", * stringValue: "sampleString", * }, * { * key: "sample_boolean", * booleanValue: false, * }, * { * key: "sample_integer", * integerValue: 1, * }, * { * key: "sample_secret_value", * secretValue: { * secretVersion: secret_version_basic.name, * }, * }, * { * key: "sample_encryption_key_value", * encryptionKeyValue: { * type: "GOOGLE_MANAGED", * kmsKeyName: "sampleKMSKkey", * }, * }, * ], * authType: "USER_PASSWORD", * authKey: "sampleAuthKey", * userPassword: { * username: "user@xyz.com", * password: { * secretVersion: secret_version_basic.name, * }, * }, * }, * destinationConfigs: [{ * key: "url", * destinations: [{ * host: "https://test.zendesk.com", * port: 80, * }], * }], * lockConfig: { * locked: false, * reason: "Its not locked", * }, * logConfig: { * enabled: true, * }, * nodeConfig: { * minNodeCount: 2, * maxNodeCount: 50, * }, * labels: { * foo: "bar", * }, * sslConfig: { * additionalVariables: [ * { * key: "sample_string", * stringValue: "sampleString", * }, * { * key: "sample_boolean", * booleanValue: false, * }, * { * key: "sample_integer", * integerValue: 1, * }, * { * key: "sample_secret_value", * secretValue: { * secretVersion: secret_version_basic.name, * }, * }, * { * key: "sample_encryption_key_value", * encryptionKeyValue: { * type: "GOOGLE_MANAGED", * kmsKeyName: "sampleKMSKkey", * }, * }, * ], * clientCertType: "PEM", * clientCertificate: { * secretVersion: secret_version_basic.name, * }, * clientPrivateKey: { * secretVersion: secret_version_basic.name, * }, * clientPrivateKeyPass: { * secretVersion: secret_version_basic.name, * }, * privateServerCertificate: { * secretVersion: secret_version_basic.name, * }, * serverCertType: "PEM", * trustModel: "PRIVATE", * type: "TLS", * useSsl: true, * }, * eventingEnablementType: "EVENTING_AND_CONNECTION", * eventingConfig: { * additionalVariables: [ * { * key: "sample_string", * stringValue: "sampleString", * }, * { * key: "sample_boolean", * booleanValue: false, * }, * { * key: "sample_integer", * integerValue: 1, * }, * { * key: "sample_secret_value", * secretValue: { * secretVersion: secret_version_basic.name, * }, * }, * { * key: "sample_encryption_key_value", * encryptionKeyValue: { * type: "GOOGLE_MANAGED", * kmsKeyName: "sampleKMSKkey", * }, * }, * ], * registrationDestinationConfig: { * key: "registration_destination_config", * destinations: [{ * host: "https://test.zendesk.com", * port: 80, * }], * }, * authConfig: { * authType: "USER_PASSWORD", * authKey: "sampleAuthKey", * userPassword: { * username: "user@xyz.com", * password: { * secretVersion: secret_version_basic.name, * }, * }, * additionalVariables: [ * { * key: "sample_string", * stringValue: "sampleString", * }, * { * key: "sample_boolean", * booleanValue: false, * }, * { * key: "sample_integer", * integerValue: 1, * }, * { * key: "sample_secret_value", * secretValue: { * secretVersion: secret_version_basic.name, * }, * }, * { * key: "sample_encryption_key_value", * encryptionKeyValue: { * type: "GOOGLE_MANAGED", * kmsKeyName: "sampleKMSKkey", * }, * }, * ], * }, * enrichmentEnabled: true, * }, * }); * ``` * * ## Import * * Connection can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/connections/{{name}}` * * `{{project}}/{{location}}/{{name}}` * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Connection can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:integrationconnectors/connection:Connection default projects/{{project}}/locations/{{location}}/connections/{{name}} * $ pulumi import gcp:integrationconnectors/connection:Connection default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:integrationconnectors/connection:Connection default {{location}}/{{name}} * ``` */ export declare class Connection extends pulumi.CustomResource { /** * Get an existing Connection 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, state?: ConnectionState, opts?: pulumi.CustomResourceOptions): Connection; /** * Returns true if the given object is an instance of Connection. 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 Connection; /** * authConfig for the connection. * Structure is documented below. */ readonly authConfig: pulumi.Output; /** * Config Variables for the connection. * Structure is documented below. */ readonly configVariables: pulumi.Output; /** * Connection revision. This field is only updated when the connection is created or updated by User. */ readonly connectionRevision: pulumi.Output; /** * connectorVersion of the Connector. */ readonly connectorVersion: pulumi.Output; /** * This configuration provides infra configs like rate limit threshold which need to be configurable for every connector version. * Structure is documented below. */ readonly connectorVersionInfraConfigs: pulumi.Output; /** * Flag to mark the version indicating the launch stage. */ readonly connectorVersionLaunchStage: pulumi.Output; /** * Time the Namespace was created in UTC. */ readonly createTime: pulumi.Output; /** * An arbitrary description for the Connection. */ readonly description: pulumi.Output; /** * Define the Connectors target endpoint. * Structure is documented below. */ readonly destinationConfigs: pulumi.Output; /** * 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; }>; /** * Eventing Configuration of a connection * Structure is documented below. */ readonly eventingConfig: pulumi.Output; /** * Eventing enablement type. Will be nil if eventing is not enabled. * Possible values are: `EVENTING_AND_CONNECTION`, `ONLY_EVENTING`. */ readonly eventingEnablementType: pulumi.Output; /** * Eventing Runtime Data. * Structure is documented below. */ readonly eventingRuntimeDatas: pulumi.Output; /** * Resource labels to represent user provided metadata. * * **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>; /** * Location in which Connection needs to be created. */ readonly location: pulumi.Output; /** * Determines whether or no a connection is locked. If locked, a reason must be specified. * Structure is documented below. */ readonly lockConfig: pulumi.Output; /** * Log configuration for the connection. * Structure is documented below. */ readonly logConfig: pulumi.Output; /** * Name of Connection needs to be created. */ readonly name: pulumi.Output; /** * Node configuration for the connection. * Structure is documented below. */ readonly nodeConfig: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Service account needed for runtime plane to access Google Cloud resources. */ readonly serviceAccount: pulumi.Output; /** * The name of the Service Directory service name. Used for Private Harpoon to resolve the ILB address. * e.g. "projects/cloud-connectors-e2e-testing/locations/us-central1/namespaces/istio-system/services/istio-ingressgateway-connectors" */ readonly serviceDirectory: pulumi.Output; /** * SSL Configuration of a connection * Structure is documented below. */ readonly sslConfig: pulumi.Output; /** * (Output) * Current status of eventing. * Structure is documented below. */ readonly statuses: pulumi.Output; /** * This subscription type enum states the subscription type of the project. */ readonly subscriptionType: pulumi.Output; /** * Suspended indicates if a user has suspended a connection or not. */ readonly suspended: pulumi.Output; /** * Time the Namespace was updated in UTC. */ readonly updateTime: pulumi.Output; /** * Create a Connection 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: ConnectionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Connection resources. */ export interface ConnectionState { /** * authConfig for the connection. * Structure is documented below. */ authConfig?: pulumi.Input; /** * Config Variables for the connection. * Structure is documented below. */ configVariables?: pulumi.Input[]>; /** * Connection revision. This field is only updated when the connection is created or updated by User. */ connectionRevision?: pulumi.Input; /** * connectorVersion of the Connector. */ connectorVersion?: pulumi.Input; /** * This configuration provides infra configs like rate limit threshold which need to be configurable for every connector version. * Structure is documented below. */ connectorVersionInfraConfigs?: pulumi.Input[]>; /** * Flag to mark the version indicating the launch stage. */ connectorVersionLaunchStage?: pulumi.Input; /** * Time the Namespace was created in UTC. */ createTime?: pulumi.Input; /** * An arbitrary description for the Connection. */ description?: pulumi.Input; /** * Define the Connectors target endpoint. * Structure is documented below. */ destinationConfigs?: pulumi.Input[]>; /** * 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; }>; /** * Eventing Configuration of a connection * Structure is documented below. */ eventingConfig?: pulumi.Input; /** * Eventing enablement type. Will be nil if eventing is not enabled. * Possible values are: `EVENTING_AND_CONNECTION`, `ONLY_EVENTING`. */ eventingEnablementType?: pulumi.Input; /** * Eventing Runtime Data. * Structure is documented below. */ eventingRuntimeDatas?: pulumi.Input[]>; /** * Resource labels to represent user provided metadata. * * **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; }>; /** * Location in which Connection needs to be created. */ location?: pulumi.Input; /** * Determines whether or no a connection is locked. If locked, a reason must be specified. * Structure is documented below. */ lockConfig?: pulumi.Input; /** * Log configuration for the connection. * Structure is documented below. */ logConfig?: pulumi.Input; /** * Name of Connection needs to be created. */ name?: pulumi.Input; /** * Node configuration for the connection. * Structure is documented below. */ nodeConfig?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Service account needed for runtime plane to access Google Cloud resources. */ serviceAccount?: pulumi.Input; /** * The name of the Service Directory service name. Used for Private Harpoon to resolve the ILB address. * e.g. "projects/cloud-connectors-e2e-testing/locations/us-central1/namespaces/istio-system/services/istio-ingressgateway-connectors" */ serviceDirectory?: pulumi.Input; /** * SSL Configuration of a connection * Structure is documented below. */ sslConfig?: pulumi.Input; /** * (Output) * Current status of eventing. * Structure is documented below. */ statuses?: pulumi.Input[]>; /** * This subscription type enum states the subscription type of the project. */ subscriptionType?: pulumi.Input; /** * Suspended indicates if a user has suspended a connection or not. */ suspended?: pulumi.Input; /** * Time the Namespace was updated in UTC. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Connection resource. */ export interface ConnectionArgs { /** * authConfig for the connection. * Structure is documented below. */ authConfig?: pulumi.Input; /** * Config Variables for the connection. * Structure is documented below. */ configVariables?: pulumi.Input[]>; /** * connectorVersion of the Connector. */ connectorVersion: pulumi.Input; /** * An arbitrary description for the Connection. */ description?: pulumi.Input; /** * Define the Connectors target endpoint. * Structure is documented below. */ destinationConfigs?: pulumi.Input[]>; /** * Eventing Configuration of a connection * Structure is documented below. */ eventingConfig?: pulumi.Input; /** * Eventing enablement type. Will be nil if eventing is not enabled. * Possible values are: `EVENTING_AND_CONNECTION`, `ONLY_EVENTING`. */ eventingEnablementType?: pulumi.Input; /** * Resource labels to represent user provided metadata. * * **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; }>; /** * Location in which Connection needs to be created. */ location: pulumi.Input; /** * Determines whether or no a connection is locked. If locked, a reason must be specified. * Structure is documented below. */ lockConfig?: pulumi.Input; /** * Log configuration for the connection. * Structure is documented below. */ logConfig?: pulumi.Input; /** * Name of Connection needs to be created. */ name?: pulumi.Input; /** * Node configuration for the connection. * Structure is documented below. */ nodeConfig?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Service account needed for runtime plane to access Google Cloud resources. */ serviceAccount?: pulumi.Input; /** * SSL Configuration of a connection * Structure is documented below. */ sslConfig?: pulumi.Input; /** * Suspended indicates if a user has suspended a connection or not. */ suspended?: pulumi.Input; }