UNPKG

@pulumi/gcp

Version:

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

632 lines (631 loc) • 25.4 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A Google Cloud Looker instance. * * To get more information about Instance, see: * * * [API documentation](https://cloud.google.com/looker/docs/reference/rest/v1/projects.locations.instances) * * How-to Guides * * [Configure a Looker (Google Cloud core) instance](https://cloud.google.com/looker/docs/looker-core-instance-setup) * * [Create a Looker (Google Cloud core) instance](https://cloud.google.com/looker/docs/looker-core-instance-create) * * ## Example Usage * * ### Looker Instance Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const looker_instance = new gcp.looker.Instance("looker-instance", { * name: "my-instance", * platformEdition: "LOOKER_CORE_STANDARD_ANNUAL", * region: "us-central1", * oauthConfig: { * clientId: "my-client-id", * clientSecret: "my-client-secret", * }, * deletionPolicy: "DEFAULT", * }); * ``` * ### Looker Instance Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const looker_instance = new gcp.looker.Instance("looker-instance", { * name: "my-instance", * platformEdition: "LOOKER_CORE_STANDARD_ANNUAL", * region: "us-central1", * publicIpEnabled: true, * adminSettings: { * allowedEmailDomains: ["google.com"], * }, * maintenanceWindow: { * dayOfWeek: "THURSDAY", * startTime: { * hours: 22, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }, * denyMaintenancePeriod: { * startDate: { * year: 2050, * month: 1, * day: 1, * }, * endDate: { * year: 2050, * month: 2, * day: 1, * }, * time: { * hours: 10, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }, * oauthConfig: { * clientId: "my-client-id", * clientSecret: "my-client-secret", * }, * }); * ``` * ### Looker Instance Fips * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const looker_instance = new gcp.looker.Instance("looker-instance", { * name: "my-instance-fips", * platformEdition: "LOOKER_CORE_ENTERPRISE_ANNUAL", * region: "us-central1", * publicIpEnabled: true, * fipsEnabled: true, * oauthConfig: { * clientId: "my-client-id", * clientSecret: "my-client-secret", * }, * }); * ``` * ### Looker Instance Enterprise Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const lookerNetwork = new gcp.compute.Network("looker_network", {name: "looker-network"}); * const lookerRange = new gcp.compute.GlobalAddress("looker_range", { * name: "looker-range", * purpose: "VPC_PEERING", * addressType: "INTERNAL", * prefixLength: 20, * network: lookerNetwork.id, * }); * const lookerVpcConnection = new gcp.servicenetworking.Connection("looker_vpc_connection", { * network: lookerNetwork.id, * service: "servicenetworking.googleapis.com", * reservedPeeringRanges: [lookerRange.name], * }); * const looker_instance = new gcp.looker.Instance("looker-instance", { * name: "my-instance", * platformEdition: "LOOKER_CORE_ENTERPRISE_ANNUAL", * region: "us-central1", * privateIpEnabled: true, * publicIpEnabled: false, * reservedRange: lookerRange.name, * consumerNetwork: lookerNetwork.id, * adminSettings: { * allowedEmailDomains: ["google.com"], * }, * encryptionConfig: { * kmsKeyName: "looker-kms-key", * }, * maintenanceWindow: { * dayOfWeek: "THURSDAY", * startTime: { * hours: 22, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }, * denyMaintenancePeriod: { * startDate: { * year: 2050, * month: 1, * day: 1, * }, * endDate: { * year: 2050, * month: 2, * day: 1, * }, * time: { * hours: 10, * minutes: 0, * seconds: 0, * nanos: 0, * }, * }, * oauthConfig: { * clientId: "my-client-id", * clientSecret: "my-client-secret", * }, * }, { * dependsOn: [lookerVpcConnection], * }); * const project = gcp.organizations.getProject({}); * const cryptoKey = new gcp.kms.CryptoKeyIAMMember("crypto_key", { * cryptoKeyId: "looker-kms-key", * role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", * member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-looker.iam.gserviceaccount.com`), * }); * ``` * ### Looker Instance Custom Domain * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const looker_instance = new gcp.looker.Instance("looker-instance", { * name: "my-instance", * platformEdition: "LOOKER_CORE_STANDARD_ANNUAL", * region: "us-central1", * oauthConfig: { * clientId: "my-client-id", * clientSecret: "my-client-secret", * }, * customDomain: { * domain: "my-custom-domain.com", * }, * }); * ``` * ### Looker Instance Psc * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const looker_instance = new gcp.looker.Instance("looker-instance", { * name: "my-instance", * platformEdition: "LOOKER_CORE_ENTERPRISE_ANNUAL", * region: "us-central1", * privateIpEnabled: false, * publicIpEnabled: false, * pscEnabled: true, * oauthConfig: { * clientId: "my-client-id", * clientSecret: "my-client-secret", * }, * pscConfig: { * allowedVpcs: ["projects/test-project/global/networks/test"], * }, * }); * ``` * ### Looker Instance Force Delete * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const looker_instance = new gcp.looker.Instance("looker-instance", { * name: "my-instance", * platformEdition: "LOOKER_CORE_STANDARD_ANNUAL", * region: "us-central1", * oauthConfig: { * clientId: "my-client-id", * clientSecret: "my-client-secret", * }, * deletionPolicy: "FORCE", * }); * ``` * * ## 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:looker/instance:Instance default projects/{{project}}/locations/{{region}}/instances/{{name}} * ``` * * ```sh * $ pulumi import gcp:looker/instance:Instance default {{project}}/{{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:looker/instance:Instance default {{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:looker/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; /** * Looker instance Admin settings. */ readonly adminSettings: pulumi.Output<outputs.looker.InstanceAdminSettings | undefined>; /** * Network name in the consumer project in the format of: projects/{project}/global/networks/{network} Note that the * consumer network may be in a different GCP project than the consumer project that is hosting the Looker Instance. */ readonly consumerNetwork: pulumi.Output<string | undefined>; /** * The time the instance was created in RFC3339 UTC "Zulu" format, * accurate to nanoseconds. */ readonly createTime: pulumi.Output<string>; /** * Custom domain settings for a Looker instance. */ readonly customDomain: pulumi.Output<outputs.looker.InstanceCustomDomain | undefined>; /** * Policy to determine if the cluster should be deleted forcefully. If setting deletionPolicy = "FORCE", the Looker * instance will be deleted regardless of its nested resources. If set to "DEFAULT", Looker instances that still have * nested resources will return an error. Possible values: DEFAULT, FORCE */ readonly deletionPolicy: pulumi.Output<string | undefined>; /** * Maintenance denial period for this instance. You must allow at least 14 days of maintenance availability between any two * deny maintenance periods. */ readonly denyMaintenancePeriod: pulumi.Output<outputs.looker.InstanceDenyMaintenancePeriod | undefined>; /** * Public Egress IP (IPv4). */ readonly egressPublicIp: pulumi.Output<string>; /** * Looker instance encryption settings. */ readonly encryptionConfig: pulumi.Output<outputs.looker.InstanceEncryptionConfig>; /** * FIPS 140-2 Encryption enablement for Looker (Google Cloud Core). */ readonly fipsEnabled: pulumi.Output<boolean | undefined>; /** * Private Ingress IP (IPv4). */ readonly ingressPrivateIp: pulumi.Output<string>; /** * Public Ingress IP (IPv4). */ readonly ingressPublicIp: pulumi.Output<string>; /** * Looker instance URI which can be used to access the Looker Instance UI. */ readonly lookerUri: pulumi.Output<string>; /** * The Looker version that the instance is using. */ readonly lookerVersion: pulumi.Output<string>; /** * Maintenance window for an instance. Maintenance of your instance takes place once a month, and will require your * instance to be restarted during updates, which will temporarily disrupt service. */ readonly maintenanceWindow: pulumi.Output<outputs.looker.InstanceMaintenanceWindow | undefined>; /** * The ID of the instance or a fully qualified identifier for the instance. */ readonly name: pulumi.Output<string>; /** * Looker Instance OAuth login settings. * Structure is documented below. */ readonly oauthConfig: pulumi.Output<outputs.looker.InstanceOauthConfig>; /** * Platform editions for a Looker instance. Each edition maps to a set of instance features, like its size. Must be one of * these values: - LOOKER_CORE_TRIAL: trial instance (Currently Unavailable) - LOOKER_CORE_STANDARD: pay as you go standard * instance (Currently Unavailable) - LOOKER_CORE_STANDARD_ANNUAL: subscription standard instance - * LOOKER_CORE_ENTERPRISE_ANNUAL: subscription enterprise instance - LOOKER_CORE_EMBED_ANNUAL: subscription embed instance * - LOOKER_CORE_NONPROD_STANDARD_ANNUAL: nonprod subscription standard instance - LOOKER_CORE_NONPROD_ENTERPRISE_ANNUAL: * nonprod subscription enterprise instance - LOOKER_CORE_NONPROD_EMBED_ANNUAL: nonprod subscription embed instance Default * value: "LOOKER_CORE_TRIAL" Possible values: ["LOOKER_CORE_TRIAL", "LOOKER_CORE_STANDARD", "LOOKER_CORE_STANDARD_ANNUAL", * "LOOKER_CORE_ENTERPRISE_ANNUAL", "LOOKER_CORE_EMBED_ANNUAL", "LOOKER_CORE_NONPROD_STANDARD_ANNUAL", * "LOOKER_CORE_NONPROD_ENTERPRISE_ANNUAL", "LOOKER_CORE_NONPROD_EMBED_ANNUAL"] */ readonly platformEdition: pulumi.Output<string | undefined>; /** * Whether private IP is enabled on the Looker instance. */ readonly privateIpEnabled: pulumi.Output<boolean | undefined>; readonly project: pulumi.Output<string>; /** * Information for Private Service Connect (PSC) setup for a Looker instance. */ readonly pscConfig: pulumi.Output<outputs.looker.InstancePscConfig | undefined>; /** * Whether Public Service Connect (PSC) is enabled on the Looker instance */ readonly pscEnabled: pulumi.Output<boolean | undefined>; /** * Whether public IP is enabled on the Looker instance. */ readonly publicIpEnabled: pulumi.Output<boolean | undefined>; /** * The name of the Looker region of the instance. */ readonly region: pulumi.Output<string>; /** * Name of a reserved IP address range within the consumer network, to be used for private service access connection. User * may or may not specify this in a request. */ readonly reservedRange: pulumi.Output<string | undefined>; /** * The time the instance was updated in RFC3339 UTC "Zulu" format, * accurate to nanoseconds. */ readonly updateTime: pulumi.Output<string>; /** * Metadata about users for a Looker instance. These settings are only available when platform edition LOOKER_CORE_STANDARD * is set. There are ten Standard and two Developer users included in the cost of the product. You can allocate additional * Standard, Viewer, and Developer users for this instance. It is an optional step and can be modified later. With the * Standard edition of Looker (Google Cloud core), you can provision up to 50 total users, distributed across Viewer, * Standard, and Developer. */ readonly userMetadata: pulumi.Output<outputs.looker.InstanceUserMetadata | undefined>; /** * 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 { /** * Looker instance Admin settings. */ adminSettings?: pulumi.Input<inputs.looker.InstanceAdminSettings>; /** * Network name in the consumer project in the format of: projects/{project}/global/networks/{network} Note that the * consumer network may be in a different GCP project than the consumer project that is hosting the Looker Instance. */ consumerNetwork?: pulumi.Input<string>; /** * The time the instance was created in RFC3339 UTC "Zulu" format, * accurate to nanoseconds. */ createTime?: pulumi.Input<string>; /** * Custom domain settings for a Looker instance. */ customDomain?: pulumi.Input<inputs.looker.InstanceCustomDomain>; /** * Policy to determine if the cluster should be deleted forcefully. If setting deletionPolicy = "FORCE", the Looker * instance will be deleted regardless of its nested resources. If set to "DEFAULT", Looker instances that still have * nested resources will return an error. Possible values: DEFAULT, FORCE */ deletionPolicy?: pulumi.Input<string>; /** * Maintenance denial period for this instance. You must allow at least 14 days of maintenance availability between any two * deny maintenance periods. */ denyMaintenancePeriod?: pulumi.Input<inputs.looker.InstanceDenyMaintenancePeriod>; /** * Public Egress IP (IPv4). */ egressPublicIp?: pulumi.Input<string>; /** * Looker instance encryption settings. */ encryptionConfig?: pulumi.Input<inputs.looker.InstanceEncryptionConfig>; /** * FIPS 140-2 Encryption enablement for Looker (Google Cloud Core). */ fipsEnabled?: pulumi.Input<boolean>; /** * Private Ingress IP (IPv4). */ ingressPrivateIp?: pulumi.Input<string>; /** * Public Ingress IP (IPv4). */ ingressPublicIp?: pulumi.Input<string>; /** * Looker instance URI which can be used to access the Looker Instance UI. */ lookerUri?: pulumi.Input<string>; /** * The Looker version that the instance is using. */ lookerVersion?: pulumi.Input<string>; /** * Maintenance window for an instance. Maintenance of your instance takes place once a month, and will require your * instance to be restarted during updates, which will temporarily disrupt service. */ maintenanceWindow?: pulumi.Input<inputs.looker.InstanceMaintenanceWindow>; /** * The ID of the instance or a fully qualified identifier for the instance. */ name?: pulumi.Input<string>; /** * Looker Instance OAuth login settings. * Structure is documented below. */ oauthConfig?: pulumi.Input<inputs.looker.InstanceOauthConfig>; /** * Platform editions for a Looker instance. Each edition maps to a set of instance features, like its size. Must be one of * these values: - LOOKER_CORE_TRIAL: trial instance (Currently Unavailable) - LOOKER_CORE_STANDARD: pay as you go standard * instance (Currently Unavailable) - LOOKER_CORE_STANDARD_ANNUAL: subscription standard instance - * LOOKER_CORE_ENTERPRISE_ANNUAL: subscription enterprise instance - LOOKER_CORE_EMBED_ANNUAL: subscription embed instance * - LOOKER_CORE_NONPROD_STANDARD_ANNUAL: nonprod subscription standard instance - LOOKER_CORE_NONPROD_ENTERPRISE_ANNUAL: * nonprod subscription enterprise instance - LOOKER_CORE_NONPROD_EMBED_ANNUAL: nonprod subscription embed instance Default * value: "LOOKER_CORE_TRIAL" Possible values: ["LOOKER_CORE_TRIAL", "LOOKER_CORE_STANDARD", "LOOKER_CORE_STANDARD_ANNUAL", * "LOOKER_CORE_ENTERPRISE_ANNUAL", "LOOKER_CORE_EMBED_ANNUAL", "LOOKER_CORE_NONPROD_STANDARD_ANNUAL", * "LOOKER_CORE_NONPROD_ENTERPRISE_ANNUAL", "LOOKER_CORE_NONPROD_EMBED_ANNUAL"] */ platformEdition?: pulumi.Input<string>; /** * Whether private IP is enabled on the Looker instance. */ privateIpEnabled?: pulumi.Input<boolean>; project?: pulumi.Input<string>; /** * Information for Private Service Connect (PSC) setup for a Looker instance. */ pscConfig?: pulumi.Input<inputs.looker.InstancePscConfig>; /** * Whether Public Service Connect (PSC) is enabled on the Looker instance */ pscEnabled?: pulumi.Input<boolean>; /** * Whether public IP is enabled on the Looker instance. */ publicIpEnabled?: pulumi.Input<boolean>; /** * The name of the Looker region of the instance. */ region?: pulumi.Input<string>; /** * Name of a reserved IP address range within the consumer network, to be used for private service access connection. User * may or may not specify this in a request. */ reservedRange?: pulumi.Input<string>; /** * The time the instance was updated in RFC3339 UTC "Zulu" format, * accurate to nanoseconds. */ updateTime?: pulumi.Input<string>; /** * Metadata about users for a Looker instance. These settings are only available when platform edition LOOKER_CORE_STANDARD * is set. There are ten Standard and two Developer users included in the cost of the product. You can allocate additional * Standard, Viewer, and Developer users for this instance. It is an optional step and can be modified later. With the * Standard edition of Looker (Google Cloud core), you can provision up to 50 total users, distributed across Viewer, * Standard, and Developer. */ userMetadata?: pulumi.Input<inputs.looker.InstanceUserMetadata>; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * Looker instance Admin settings. */ adminSettings?: pulumi.Input<inputs.looker.InstanceAdminSettings>; /** * Network name in the consumer project in the format of: projects/{project}/global/networks/{network} Note that the * consumer network may be in a different GCP project than the consumer project that is hosting the Looker Instance. */ consumerNetwork?: pulumi.Input<string>; /** * Custom domain settings for a Looker instance. */ customDomain?: pulumi.Input<inputs.looker.InstanceCustomDomain>; /** * Policy to determine if the cluster should be deleted forcefully. If setting deletionPolicy = "FORCE", the Looker * instance will be deleted regardless of its nested resources. If set to "DEFAULT", Looker instances that still have * nested resources will return an error. Possible values: DEFAULT, FORCE */ deletionPolicy?: pulumi.Input<string>; /** * Maintenance denial period for this instance. You must allow at least 14 days of maintenance availability between any two * deny maintenance periods. */ denyMaintenancePeriod?: pulumi.Input<inputs.looker.InstanceDenyMaintenancePeriod>; /** * Looker instance encryption settings. */ encryptionConfig?: pulumi.Input<inputs.looker.InstanceEncryptionConfig>; /** * FIPS 140-2 Encryption enablement for Looker (Google Cloud Core). */ fipsEnabled?: pulumi.Input<boolean>; /** * Maintenance window for an instance. Maintenance of your instance takes place once a month, and will require your * instance to be restarted during updates, which will temporarily disrupt service. */ maintenanceWindow?: pulumi.Input<inputs.looker.InstanceMaintenanceWindow>; /** * The ID of the instance or a fully qualified identifier for the instance. */ name?: pulumi.Input<string>; /** * Looker Instance OAuth login settings. * Structure is documented below. */ oauthConfig: pulumi.Input<inputs.looker.InstanceOauthConfig>; /** * Platform editions for a Looker instance. Each edition maps to a set of instance features, like its size. Must be one of * these values: - LOOKER_CORE_TRIAL: trial instance (Currently Unavailable) - LOOKER_CORE_STANDARD: pay as you go standard * instance (Currently Unavailable) - LOOKER_CORE_STANDARD_ANNUAL: subscription standard instance - * LOOKER_CORE_ENTERPRISE_ANNUAL: subscription enterprise instance - LOOKER_CORE_EMBED_ANNUAL: subscription embed instance * - LOOKER_CORE_NONPROD_STANDARD_ANNUAL: nonprod subscription standard instance - LOOKER_CORE_NONPROD_ENTERPRISE_ANNUAL: * nonprod subscription enterprise instance - LOOKER_CORE_NONPROD_EMBED_ANNUAL: nonprod subscription embed instance Default * value: "LOOKER_CORE_TRIAL" Possible values: ["LOOKER_CORE_TRIAL", "LOOKER_CORE_STANDARD", "LOOKER_CORE_STANDARD_ANNUAL", * "LOOKER_CORE_ENTERPRISE_ANNUAL", "LOOKER_CORE_EMBED_ANNUAL", "LOOKER_CORE_NONPROD_STANDARD_ANNUAL", * "LOOKER_CORE_NONPROD_ENTERPRISE_ANNUAL", "LOOKER_CORE_NONPROD_EMBED_ANNUAL"] */ platformEdition?: pulumi.Input<string>; /** * Whether private IP is enabled on the Looker instance. */ privateIpEnabled?: pulumi.Input<boolean>; project?: pulumi.Input<string>; /** * Information for Private Service Connect (PSC) setup for a Looker instance. */ pscConfig?: pulumi.Input<inputs.looker.InstancePscConfig>; /** * Whether Public Service Connect (PSC) is enabled on the Looker instance */ pscEnabled?: pulumi.Input<boolean>; /** * Whether public IP is enabled on the Looker instance. */ publicIpEnabled?: pulumi.Input<boolean>; /** * The name of the Looker region of the instance. */ region?: pulumi.Input<string>; /** * Name of a reserved IP address range within the consumer network, to be used for private service access connection. User * may or may not specify this in a request. */ reservedRange?: pulumi.Input<string>; /** * Metadata about users for a Looker instance. These settings are only available when platform edition LOOKER_CORE_STANDARD * is set. There are ten Standard and two Developer users included in the cost of the product. You can allocate additional * Standard, Viewer, and Developer users for this instance. It is an optional step and can be modified later. With the * Standard edition of Looker (Google Cloud core), you can provision up to 50 total users, distributed across Viewer, * Standard, and Developer. */ userMetadata?: pulumi.Input<inputs.looker.InstanceUserMetadata>; }