UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

708 lines (707 loc) • 27.2 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Represents a Data Fusion instance. * * To get more information about Instance, see: * * * [API documentation](https://cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances) * * How-to Guides * * [Official Documentation](https://cloud.google.com/data-fusion/docs/) * * ## Example Usage * * ### Data Fusion Instance Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const basicInstance = new gcp.datafusion.Instance("basic_instance", { * name: "my-instance", * region: "us-central1", * type: "BASIC", * }); * ``` * ### Data Fusion Instance Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = gcp.appengine.getDefaultServiceAccount({}); * const network = new gcp.compute.Network("network", {name: "datafusion-full-network"}); * const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", { * name: "datafusion-ip-alloc", * addressType: "INTERNAL", * purpose: "VPC_PEERING", * prefixLength: 22, * network: network.id, * }); * const extendedInstance = new gcp.datafusion.Instance("extended_instance", { * name: "my-instance", * description: "My Data Fusion instance", * displayName: "My Data Fusion instance", * region: "us-central1", * type: "BASIC", * enableStackdriverLogging: true, * enableStackdriverMonitoring: true, * privateInstance: true, * dataprocServiceAccount: _default.then(_default => _default.email), * labels: { * example_key: "example_value", * }, * networkConfig: { * network: "default", * ipAllocation: pulumi.interpolate`${privateIpAlloc.address}/${privateIpAlloc.prefixLength}`, * }, * accelerators: [{ * acceleratorType: "CDC", * state: "ENABLED", * }], * }); * ``` * ### Data Fusion Instance Psc * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const psc = new gcp.compute.Network("psc", { * name: "datafusion-psc-network", * autoCreateSubnetworks: false, * }); * const pscSubnetwork = new gcp.compute.Subnetwork("psc", { * name: "datafusion-psc-subnet", * region: "us-central1", * network: psc.id, * ipCidrRange: "10.0.0.0/16", * }); * const pscNetworkAttachment = new gcp.compute.NetworkAttachment("psc", { * name: "datafusion-psc-attachment", * region: "us-central1", * connectionPreference: "ACCEPT_AUTOMATIC", * subnetworks: [pscSubnetwork.selfLink], * }); * const pscInstance = new gcp.datafusion.Instance("psc_instance", { * name: "psc-instance", * region: "us-central1", * type: "BASIC", * privateInstance: true, * networkConfig: { * connectionType: "PRIVATE_SERVICE_CONNECT_INTERFACES", * privateServiceConnectConfig: { * networkAttachment: pscNetworkAttachment.id, * unreachableCidrBlock: "192.168.0.0/25", * }, * }, * }); * ``` * ### Data Fusion Instance Cmek * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const keyRing = new gcp.kms.KeyRing("key_ring", { * name: "my-instance", * location: "us-central1", * }); * const cryptoKey = new gcp.kms.CryptoKey("crypto_key", { * name: "my-instance", * keyRing: keyRing.id, * }); * const project = gcp.organizations.getProject({}); * const cryptoKeyMember = new gcp.kms.CryptoKeyIAMMember("crypto_key_member", { * cryptoKeyId: cryptoKey.id, * role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", * member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-datafusion.iam.gserviceaccount.com`), * }); * const cmek = new gcp.datafusion.Instance("cmek", { * name: "my-instance", * region: "us-central1", * type: "BASIC", * cryptoKeyConfig: { * keyReference: cryptoKey.id, * }, * }, { * dependsOn: [cryptoKeyMember], * }); * ``` * ### Data Fusion Instance Enterprise * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const enterpriseInstance = new gcp.datafusion.Instance("enterprise_instance", { * name: "my-instance", * region: "us-central1", * type: "ENTERPRISE", * enableRbac: true, * }); * ``` * ### Data Fusion Instance Event * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const eventTopic = new gcp.pubsub.Topic("event", {name: "my-instance"}); * const event = new gcp.datafusion.Instance("event", { * name: "my-instance", * region: "us-central1", * type: "BASIC", * eventPublishConfig: { * enabled: true, * topic: eventTopic.id, * }, * }); * ``` * ### Data Fusion Instance Zone * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const zone = new gcp.datafusion.Instance("zone", { * name: "my-instance", * region: "us-central1", * zone: "us-central1-a", * type: "DEVELOPER", * }); * ``` * * ## Import * * Instance can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{region}}/instances/{{name}}` * * * `{{project}}/{{region}}/{{name}}` * * * `{{region}}/{{name}}` * * * `{{name}}` * * When using the `pulumi import` command, Instance can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:datafusion/instance:Instance default projects/{{project}}/locations/{{region}}/instances/{{name}} * ``` * * ```sh * $ pulumi import gcp:datafusion/instance:Instance default {{project}}/{{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:datafusion/instance:Instance default {{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:datafusion/instance:Instance default {{name}} * ``` */ export declare class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance; /** * Returns true if the given object is an instance of Instance. 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 Instance; /** * List of accelerators enabled for this CDF instance. * If accelerators are enabled it is possible a permadiff will be created with the Options field. * Users will need to either manually update their state file to include these diffed options, or include the field in a lifecycle ignore changes block. * Structure is documented below. */ readonly accelerators: pulumi.Output<outputs.datafusion.InstanceAccelerator[] | undefined>; /** * Endpoint on which the REST APIs is accessible. */ readonly apiEndpoint: pulumi.Output<string>; /** * The time the instance was created in RFC3339 UTC "Zulu" format, accurate to nanoseconds. */ readonly createTime: pulumi.Output<string>; /** * The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. * Structure is documented below. */ readonly cryptoKeyConfig: pulumi.Output<outputs.datafusion.InstanceCryptoKeyConfig | undefined>; /** * User-managed service account to set on Dataproc when Cloud Data Fusion creates Dataproc to run data processing pipelines. */ readonly dataprocServiceAccount: pulumi.Output<string | undefined>; /** * An optional description of the instance. */ readonly description: pulumi.Output<string | undefined>; /** * Display name for an instance. */ readonly displayName: pulumi.Output<string | undefined>; /** * 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; }>; /** * Option to enable granular role-based access control. */ readonly enableRbac: pulumi.Output<boolean | undefined>; /** * Option to enable Stackdriver Logging. */ readonly enableStackdriverLogging: pulumi.Output<boolean | undefined>; /** * Option to enable Stackdriver Monitoring. */ readonly enableStackdriverMonitoring: pulumi.Output<boolean | undefined>; /** * Option to enable and pass metadata for event publishing. * Structure is documented below. */ readonly eventPublishConfig: pulumi.Output<outputs.datafusion.InstanceEventPublishConfig | undefined>; /** * Cloud Storage bucket generated by Data Fusion in the customer project. */ readonly gcsBucket: pulumi.Output<string>; /** * The resource labels for instance to use to annotate any related underlying resources, * such as Compute Engine VMs. * * **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>; /** * The ID of the instance or a fully qualified identifier for the instance. */ readonly name: pulumi.Output<string>; /** * Network configuration options. These are required when a private Data Fusion instance is to be created. * Structure is documented below. */ readonly networkConfig: pulumi.Output<outputs.datafusion.InstanceNetworkConfig | undefined>; /** * Map of additional options used to configure the behavior of Data Fusion instance. */ readonly options: pulumi.Output<{ [key: string]: string; }>; /** * P4 service account for the customer project. */ readonly p4ServiceAccount: pulumi.Output<string>; /** * Specifies whether the Data Fusion instance should be private. If set to * true, all Data Fusion nodes will have private IP addresses and will not be * able to access the public internet. */ readonly privateInstance: pulumi.Output<boolean | undefined>; /** * 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 region of the Data Fusion instance. */ readonly region: pulumi.Output<string>; /** * Service account which will be used to access resources in the customer project. * * @deprecated `serviceAccount` is deprecated and will be removed in a future major release. Instead, use `tenantProjectId` to extract the tenant project ID. */ readonly serviceAccount: pulumi.Output<string>; /** * Endpoint on which the Data Fusion UI and REST APIs are accessible. */ readonly serviceEndpoint: pulumi.Output<string>; /** * The current state of this Data Fusion instance. * - CREATING: Instance is being created * - RUNNING: Instance is running and ready for requests * - FAILED: Instance creation failed * - DELETING: Instance is being deleted * - UPGRADING: Instance is being upgraded * - RESTARTING: Instance is being restarted */ readonly state: pulumi.Output<string>; /** * Additional information about the current state of this Data Fusion instance if available. */ readonly stateMessage: pulumi.Output<string>; /** * A map of resource manager tags. * Resource manager tag keys and values have the same definition as resource manager tags. * Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/{tag_value_id}. * The field is ignored (both PUT & PATCH) when empty. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The name of the tenant project. */ readonly tenantProjectId: pulumi.Output<string>; /** * Represents the type of Data Fusion instance. Each type is configured with * the default settings for processing and memory. * - BASIC: Basic Data Fusion instance. In Basic type, the user will be able to create data pipelines * using point and click UI. However, there are certain limitations, such as fewer number * of concurrent pipelines, no support for streaming pipelines, etc. * - ENTERPRISE: Enterprise Data Fusion instance. In Enterprise type, the user will have more features * available, such as support for streaming pipelines, higher number of concurrent pipelines, etc. * - DEVELOPER: Developer Data Fusion instance. In Developer type, the user will have all features available but * with restrictive capabilities. This is to help enterprises design and develop their data ingestion and integration * pipelines at low cost. * Possible values are: `BASIC`, `ENTERPRISE`, `DEVELOPER`. * * * - - - */ readonly type: pulumi.Output<string>; /** * The time the instance was last updated in RFC3339 UTC "Zulu" format, accurate to nanoseconds. */ readonly updateTime: pulumi.Output<string>; /** * Current version of the Data Fusion. */ readonly version: pulumi.Output<string>; /** * Name of the zone in which the Data Fusion instance will be created. Only DEVELOPER instances use this field. */ readonly zone: pulumi.Output<string>; /** * Create a Instance 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: InstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Instance resources. */ export interface InstanceState { /** * List of accelerators enabled for this CDF instance. * If accelerators are enabled it is possible a permadiff will be created with the Options field. * Users will need to either manually update their state file to include these diffed options, or include the field in a lifecycle ignore changes block. * Structure is documented below. */ accelerators?: pulumi.Input<pulumi.Input<inputs.datafusion.InstanceAccelerator>[]>; /** * Endpoint on which the REST APIs is accessible. */ apiEndpoint?: pulumi.Input<string>; /** * The time the instance was created in RFC3339 UTC "Zulu" format, accurate to nanoseconds. */ createTime?: pulumi.Input<string>; /** * The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. * Structure is documented below. */ cryptoKeyConfig?: pulumi.Input<inputs.datafusion.InstanceCryptoKeyConfig>; /** * User-managed service account to set on Dataproc when Cloud Data Fusion creates Dataproc to run data processing pipelines. */ dataprocServiceAccount?: pulumi.Input<string>; /** * An optional description of the instance. */ description?: pulumi.Input<string>; /** * Display name for an instance. */ displayName?: 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>; }>; /** * Option to enable granular role-based access control. */ enableRbac?: pulumi.Input<boolean>; /** * Option to enable Stackdriver Logging. */ enableStackdriverLogging?: pulumi.Input<boolean>; /** * Option to enable Stackdriver Monitoring. */ enableStackdriverMonitoring?: pulumi.Input<boolean>; /** * Option to enable and pass metadata for event publishing. * Structure is documented below. */ eventPublishConfig?: pulumi.Input<inputs.datafusion.InstanceEventPublishConfig>; /** * Cloud Storage bucket generated by Data Fusion in the customer project. */ gcsBucket?: pulumi.Input<string>; /** * The resource labels for instance to use to annotate any related underlying resources, * such as Compute Engine VMs. * * **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>; }>; /** * The ID of the instance or a fully qualified identifier for the instance. */ name?: pulumi.Input<string>; /** * Network configuration options. These are required when a private Data Fusion instance is to be created. * Structure is documented below. */ networkConfig?: pulumi.Input<inputs.datafusion.InstanceNetworkConfig>; /** * Map of additional options used to configure the behavior of Data Fusion instance. */ options?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * P4 service account for the customer project. */ p4ServiceAccount?: pulumi.Input<string>; /** * Specifies whether the Data Fusion instance should be private. If set to * true, all Data Fusion nodes will have private IP addresses and will not be * able to access the public internet. */ privateInstance?: pulumi.Input<boolean>; /** * 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 region of the Data Fusion instance. */ region?: pulumi.Input<string>; /** * Service account which will be used to access resources in the customer project. * * @deprecated `serviceAccount` is deprecated and will be removed in a future major release. Instead, use `tenantProjectId` to extract the tenant project ID. */ serviceAccount?: pulumi.Input<string>; /** * Endpoint on which the Data Fusion UI and REST APIs are accessible. */ serviceEndpoint?: pulumi.Input<string>; /** * The current state of this Data Fusion instance. * - CREATING: Instance is being created * - RUNNING: Instance is running and ready for requests * - FAILED: Instance creation failed * - DELETING: Instance is being deleted * - UPGRADING: Instance is being upgraded * - RESTARTING: Instance is being restarted */ state?: pulumi.Input<string>; /** * Additional information about the current state of this Data Fusion instance if available. */ stateMessage?: pulumi.Input<string>; /** * A map of resource manager tags. * Resource manager tag keys and values have the same definition as resource manager tags. * Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/{tag_value_id}. * The field is ignored (both PUT & PATCH) when empty. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The name of the tenant project. */ tenantProjectId?: pulumi.Input<string>; /** * Represents the type of Data Fusion instance. Each type is configured with * the default settings for processing and memory. * - BASIC: Basic Data Fusion instance. In Basic type, the user will be able to create data pipelines * using point and click UI. However, there are certain limitations, such as fewer number * of concurrent pipelines, no support for streaming pipelines, etc. * - ENTERPRISE: Enterprise Data Fusion instance. In Enterprise type, the user will have more features * available, such as support for streaming pipelines, higher number of concurrent pipelines, etc. * - DEVELOPER: Developer Data Fusion instance. In Developer type, the user will have all features available but * with restrictive capabilities. This is to help enterprises design and develop their data ingestion and integration * pipelines at low cost. * Possible values are: `BASIC`, `ENTERPRISE`, `DEVELOPER`. * * * - - - */ type?: pulumi.Input<string>; /** * The time the instance was last updated in RFC3339 UTC "Zulu" format, accurate to nanoseconds. */ updateTime?: pulumi.Input<string>; /** * Current version of the Data Fusion. */ version?: pulumi.Input<string>; /** * Name of the zone in which the Data Fusion instance will be created. Only DEVELOPER instances use this field. */ zone?: pulumi.Input<string>; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * List of accelerators enabled for this CDF instance. * If accelerators are enabled it is possible a permadiff will be created with the Options field. * Users will need to either manually update their state file to include these diffed options, or include the field in a lifecycle ignore changes block. * Structure is documented below. */ accelerators?: pulumi.Input<pulumi.Input<inputs.datafusion.InstanceAccelerator>[]>; /** * The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. * Structure is documented below. */ cryptoKeyConfig?: pulumi.Input<inputs.datafusion.InstanceCryptoKeyConfig>; /** * User-managed service account to set on Dataproc when Cloud Data Fusion creates Dataproc to run data processing pipelines. */ dataprocServiceAccount?: pulumi.Input<string>; /** * An optional description of the instance. */ description?: pulumi.Input<string>; /** * Display name for an instance. */ displayName?: pulumi.Input<string>; /** * Option to enable granular role-based access control. */ enableRbac?: pulumi.Input<boolean>; /** * Option to enable Stackdriver Logging. */ enableStackdriverLogging?: pulumi.Input<boolean>; /** * Option to enable Stackdriver Monitoring. */ enableStackdriverMonitoring?: pulumi.Input<boolean>; /** * Option to enable and pass metadata for event publishing. * Structure is documented below. */ eventPublishConfig?: pulumi.Input<inputs.datafusion.InstanceEventPublishConfig>; /** * The resource labels for instance to use to annotate any related underlying resources, * such as Compute Engine VMs. * * **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>; }>; /** * The ID of the instance or a fully qualified identifier for the instance. */ name?: pulumi.Input<string>; /** * Network configuration options. These are required when a private Data Fusion instance is to be created. * Structure is documented below. */ networkConfig?: pulumi.Input<inputs.datafusion.InstanceNetworkConfig>; /** * Map of additional options used to configure the behavior of Data Fusion instance. */ options?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies whether the Data Fusion instance should be private. If set to * true, all Data Fusion nodes will have private IP addresses and will not be * able to access the public internet. */ privateInstance?: pulumi.Input<boolean>; /** * 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 region of the Data Fusion instance. */ region?: pulumi.Input<string>; /** * A map of resource manager tags. * Resource manager tag keys and values have the same definition as resource manager tags. * Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/{tag_value_id}. * The field is ignored (both PUT & PATCH) when empty. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Represents the type of Data Fusion instance. Each type is configured with * the default settings for processing and memory. * - BASIC: Basic Data Fusion instance. In Basic type, the user will be able to create data pipelines * using point and click UI. However, there are certain limitations, such as fewer number * of concurrent pipelines, no support for streaming pipelines, etc. * - ENTERPRISE: Enterprise Data Fusion instance. In Enterprise type, the user will have more features * available, such as support for streaming pipelines, higher number of concurrent pipelines, etc. * - DEVELOPER: Developer Data Fusion instance. In Developer type, the user will have all features available but * with restrictive capabilities. This is to help enterprises design and develop their data ingestion and integration * pipelines at low cost. * Possible values are: `BASIC`, `ENTERPRISE`, `DEVELOPER`. * * * - - - */ type: pulumi.Input<string>; /** * Current version of the Data Fusion. */ version?: pulumi.Input<string>; /** * Name of the zone in which the Data Fusion instance will be created. Only DEVELOPER instances use this field. */ zone?: pulumi.Input<string>; }