UNPKG

@pulumi/gcp

Version:

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

215 lines • 7.76 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Config = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * Configuration for Data Lineage. * * Defines configuration options for Lineage customers to control behavior of * lineage systems. * * To get more information about Config, see: * * * [API documentation](https://docs.cloud.google.com/dataplex/docs/reference/data-lineage/rest/v1/folders.locations.config) * * How-to Guides * * [Official Documentation](https://docs.cloud.google.com/dataplex/docs/about-data-lineage#control-lineage-ingestion) * * ## Example Usage * * ### Data Lineage Config Project * * ```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_16511", * name: "tf-test_8493", * orgId: "123456789", * deletionPolicy: "DELETE", * }); * const waitForProject = new time.Sleep("wait_for_project", {createDuration: "60s"}, { * dependsOn: [project], * }); * const datalineageApi = new gcp.projects.Service("datalineage_api", { * project: project.projectId, * service: "datalineage.googleapis.com", * }, { * dependsOn: [waitForProject], * }); * const _default = new gcp.datalineage.Config("default", { * parent: pulumi.interpolate`projects/${project.projectId}`, * location: "global", * ingestion: { * rules: [{ * integrationSelector: { * integration: "DATAPROC", * }, * lineageEnablement: { * enabled: true, * }, * }], * }, * }, { * dependsOn: [datalineageApi], * }); * ``` * ### Data Lineage Config Folder * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as time from "@pulumiverse/time"; * * const integration = new gcp.organizations.Folder("integration", { * displayName: "config-f", * parent: "organizations/123456789", * deletionProtection: false, * }); * const datalineageAdmin = new gcp.folder.IAMMember("datalineage_admin", { * folder: integration.folderId, * role: "roles/datalineage.admin", * member: "serviceAccount:my@service-account.com", * }); * const waitForFolderIam = new time.Sleep("wait_for_folder_iam", {createDuration: "60s"}, { * dependsOn: [datalineageAdmin], * }); * const _default = new gcp.datalineage.Config("default", { * parent: integration.name, * location: "global", * ingestion: { * rules: [{ * integrationSelector: { * integration: "DATAPROC", * }, * lineageEnablement: { * enabled: true, * }, * }], * }, * }, { * dependsOn: [waitForFolderIam], * }); * ``` * ### Data Lineage Config Organization * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.datalineage.Config("default", { * parent: "organizations/123456789", * location: "global", * ingestion: { * rules: [{ * integrationSelector: { * integration: "LOOKER_CORE", * }, * lineageEnablement: { * enabled: true, * }, * }], * }, * }); * ``` * * ## Import * * Config can be imported using any of these accepted formats: * * * `{{parent}}/locations/{{location}}/config` * * When using the `pulumi import` command, Config can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:datalineage/config:Config default {{parent}}/locations/{{location}}/config * ``` */ class Config extends pulumi.CustomResource { /** * Get an existing Config 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, id, state, opts) { return new Config(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:datalineage/config:Config'; /** * Returns true if the given object is an instance of Config. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Config.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["etag"] = state?.etag; resourceInputs["ingestion"] = state?.ingestion; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["parent"] = state?.parent; } else { const args = argsOrState; if (args?.ingestion === undefined && !opts.urn) { throw new Error("Missing required property 'ingestion'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.parent === undefined && !opts.urn) { throw new Error("Missing required property 'parent'"); } resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["ingestion"] = args?.ingestion; resourceInputs["location"] = args?.location; resourceInputs["parent"] = args?.parent; resourceInputs["etag"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Config.__pulumiType, name, resourceInputs, opts); } } exports.Config = Config; //# sourceMappingURL=config.js.map