import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A managed metastore service that serves metadata queries. * * To get more information about Service, see: * * * [API documentation](https://cloud.google.com/dataproc-metastore/docs/reference/rest/v1/projects.locations.services) * * How-to Guides * * [Official Documentation](https://cloud.google.com/dataproc-metastore/docs/overview) * * ## Example Usage * * ### Dataproc Metastore Service Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.dataproc.MetastoreService("default", { * serviceId: "metastore-srv", * location: "us-central1", * port: 9080, * tier: "DEVELOPER", * maintenanceWindow: { * hourOfDay: 2, * dayOfWeek: "SUNDAY", * }, * hiveMetastoreConfig: { * version: "2.3.6", * }, * labels: { * env: "test", * }, * }); * ``` * ### Dataproc Metastore Service Deletion Protection * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.dataproc.MetastoreService("default", { * serviceId: "metastore-srv", * location: "us-central1", * port: 9080, * tier: "DEVELOPER", * deletionProtection: true, * maintenanceWindow: { * hourOfDay: 2, * dayOfWeek: "SUNDAY", * }, * hiveMetastoreConfig: { * version: "2.3.6", * }, * labels: { * env: "test", * }, * }); * ``` * ### Dataproc Metastore Service Cmek Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const keyRing = new gcp.kms.KeyRing("key_ring", { * name: "example-keyring", * location: "us-central1", * }); * const cryptoKey = new gcp.kms.CryptoKey("crypto_key", { * name: "example-key", * keyRing: keyRing.id, * purpose: "ENCRYPT_DECRYPT", * }); * const _default = new gcp.dataproc.MetastoreService("default", { * serviceId: "example-service", * location: "us-central1", * encryptionConfig: { * kmsKey: cryptoKey.id, * }, * hiveMetastoreConfig: { * version: "3.1.2", * }, * }); * ``` * ### Dataproc Metastore Service Private Service Connect * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const net = new gcp.compute.Network("net", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const subnet = new gcp.compute.Subnetwork("subnet", { * name: "my-subnetwork", * region: "us-central1", * network: net.id, * ipCidrRange: "10.0.0.0/22", * privateIpGoogleAccess: true, * }); * const _default = new gcp.dataproc.MetastoreService("default", { * serviceId: "metastore-srv", * location: "us-central1", * tier: "DEVELOPER", * hiveMetastoreConfig: { * version: "3.1.2", * }, * networkConfig: { * consumers: [{ * subnetwork: subnet.id, * }], * }, * }); * ``` * ### Dataproc Metastore Service Private Service Connect Custom Routes * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const net = new gcp.compute.Network("net", { * name: "my-network", * autoCreateSubnetworks: false, * }); * const subnet = new gcp.compute.Subnetwork("subnet", { * name: "my-subnetwork", * region: "us-central1", * network: net.id, * ipCidrRange: "10.0.0.0/22", * privateIpGoogleAccess: true, * }); * const _default = new gcp.dataproc.MetastoreService("default", { * serviceId: "metastore-srv", * location: "us-central1", * hiveMetastoreConfig: { * version: "3.1.2", * }, * networkConfig: { * consumers: [{ * subnetwork: subnet.id, * }], * customRoutesEnabled: true, * }, * }); * ``` * ### Dataproc Metastore Service Dpms2 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const dpms2 = new gcp.dataproc.MetastoreService("dpms2", { * serviceId: "ms-dpms2", * location: "us-central1", * databaseType: "SPANNER", * hiveMetastoreConfig: { * version: "3.1.2", * }, * scalingConfig: { * instanceSize: "EXTRA_SMALL", * }, * }); * ``` * ### Dataproc Metastore Service Dpms2 Scaling Factor * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const dpms2ScalingFactor = new gcp.dataproc.MetastoreService("dpms2_scaling_factor", { * serviceId: "ms-dpms2sf", * location: "us-central1", * databaseType: "SPANNER", * hiveMetastoreConfig: { * version: "3.1.2", * }, * scalingConfig: { * scalingFactor: 2, * }, * }); * ``` * ### Dataproc Metastore Service Scheduled Backup * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const bucket = new gcp.storage.Bucket("bucket", { * name: "backup", * location: "us-central1", * }); * const backup = new gcp.dataproc.MetastoreService("backup", { * serviceId: "backup", * location: "us-central1", * port: 9080, * tier: "DEVELOPER", * maintenanceWindow: { * hourOfDay: 2, * dayOfWeek: "SUNDAY", * }, * hiveMetastoreConfig: { * version: "2.3.6", * }, * scheduledBackup: { * enabled: true, * cronSchedule: "0 0 * * *", * timeZone: "UTC", * backupLocation: pulumi.interpolate`gs://${bucket.name}`, * }, * labels: { * env: "test", * }, * }); * ``` * ### Dataproc Metastore Service Autoscaling Max Scaling Factor * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const testResource = new gcp.dataproc.MetastoreService("test_resource", { * serviceId: "test-service", * location: "us-central1", * databaseType: "SPANNER", * hiveMetastoreConfig: { * version: "3.1.2", * }, * scalingConfig: { * autoscalingConfig: { * autoscalingEnabled: true, * limitConfig: { * maxScalingFactor: 1, * }, * }, * }, * }); * ``` * ### Dataproc Metastore Service Autoscaling Min And Max Scaling Factor * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const testResource = new gcp.dataproc.MetastoreService("test_resource", { * serviceId: "test-service", * location: "us-central1", * databaseType: "SPANNER", * hiveMetastoreConfig: { * version: "3.1.2", * }, * scalingConfig: { * autoscalingConfig: { * autoscalingEnabled: true, * limitConfig: { * minScalingFactor: 0.1, * maxScalingFactor: 1, * }, * }, * }, * }); * ``` * ### Dataproc Metastore Service Autoscaling Min Scaling Factor * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const testResource = new gcp.dataproc.MetastoreService("test_resource", { * serviceId: "test-service", * location: "us-central1", * databaseType: "SPANNER", * hiveMetastoreConfig: { * version: "3.1.2", * }, * scalingConfig: { * autoscalingConfig: { * autoscalingEnabled: true, * limitConfig: { * minScalingFactor: 0.1, * }, * }, * }, * }); * ``` * ### Dataproc Metastore Service Autoscaling No Limit Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const testResource = new gcp.dataproc.MetastoreService("test_resource", { * serviceId: "test-service", * location: "us-central1", * databaseType: "SPANNER", * hiveMetastoreConfig: { * version: "3.1.2", * }, * scalingConfig: { * autoscalingConfig: { * autoscalingEnabled: true, * }, * }, * }); * ``` * * ## Import * * Service can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/services/{{service_id}}` * * * `{{project}}/{{location}}/{{service_id}}` * * * `{{location}}/{{service_id}}` * * When using the `pulumi import` command, Service can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:dataproc/metastoreService:MetastoreService default projects/{{project}}/locations/{{location}}/services/{{service_id}} * ``` * * ```sh * $ pulumi import gcp:dataproc/metastoreService:MetastoreService default {{project}}/{{location}}/{{service_id}} * ``` * * ```sh * $ pulumi import gcp:dataproc/metastoreService:MetastoreService default {{location}}/{{service_id}} * ``` */ export declare class MetastoreService extends pulumi.CustomResource { /** * Get an existing MetastoreService 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?: MetastoreServiceState, opts?: pulumi.CustomResourceOptions): MetastoreService; /** * Returns true if the given object is an instance of MetastoreService. 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 MetastoreService; /** * A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored. */ readonly artifactGcsUri: pulumi.Output; /** * Output only. The time when the metastore service was created. */ readonly createTime: pulumi.Output; /** * The database type that the Metastore service stores its data. * Default value is `MYSQL`. * Possible values are: `MYSQL`, `SPANNER`. */ readonly databaseType: pulumi.Output; /** * Indicates if the dataproc metastore should be protected against accidental deletions. */ readonly deletionProtection: 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; }>; /** * Information used to configure the Dataproc Metastore service to encrypt * customer data at rest. * Structure is documented below. */ readonly encryptionConfig: pulumi.Output; /** * The URI of the endpoint used to access the metastore service. */ readonly endpointUri: pulumi.Output; /** * Configuration information specific to running Hive metastore software as the metastore service. * Structure is documented below. */ readonly hiveMetastoreConfig: pulumi.Output; /** * User-defined labels for the metastore service. * **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 location where the metastore service should reside. * The default value is `global`. */ readonly location: pulumi.Output; /** * The one hour maintenance window of the metastore service. * This specifies when the service can be restarted for maintenance purposes in UTC time. * Maintenance window is not needed for services with the `SPANNER` database type. * Structure is documented below. */ readonly maintenanceWindow: pulumi.Output; /** * The setting that defines how metastore metadata should be integrated with external services and systems. * Structure is documented below. */ readonly metadataIntegration: pulumi.Output; /** * The relative resource name of the metastore service. */ readonly name: pulumi.Output; /** * The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form: * "projects/{projectNumber}/global/networks/{network_id}". */ readonly network: pulumi.Output; /** * The configuration specifying the network settings for the Dataproc Metastore service. * Structure is documented below. */ readonly networkConfig: pulumi.Output; /** * The TCP port at which the metastore service is reached. Default: 9083. */ readonly port: 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; }>; /** * The release channel of the service. If unspecified, defaults to `STABLE`. * Default value is `STABLE`. * Possible values are: `CANARY`, `STABLE`. */ readonly releaseChannel: pulumi.Output; /** * Represents the scaling configuration of a metastore service. * Structure is documented below. */ readonly scalingConfig: pulumi.Output; /** * The configuration of scheduled backup for the metastore service. * Structure is documented below. */ readonly scheduledBackup: pulumi.Output; /** * The ID of the metastore service. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between * 3 and 63 characters. */ readonly serviceId: pulumi.Output; /** * The current state of the metastore service. */ readonly state: pulumi.Output; /** * Additional information about the current state of the metastore service, if available. */ readonly stateMessage: pulumi.Output; /** * 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}. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON. * Structure is documented below. */ readonly telemetryConfig: pulumi.Output; /** * The tier of the service. * Possible values are: `DEVELOPER`, `ENTERPRISE`. */ readonly tier: pulumi.Output; /** * The globally unique resource identifier of the metastore service. */ readonly uid: pulumi.Output; /** * Output only. The time when the metastore service was last updated. */ readonly updateTime: pulumi.Output; /** * Create a MetastoreService 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?: MetastoreServiceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MetastoreService resources. */ export interface MetastoreServiceState { /** * A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored. */ artifactGcsUri?: pulumi.Input; /** * Output only. The time when the metastore service was created. */ createTime?: pulumi.Input; /** * The database type that the Metastore service stores its data. * Default value is `MYSQL`. * Possible values are: `MYSQL`, `SPANNER`. */ databaseType?: pulumi.Input; /** * Indicates if the dataproc metastore should be protected against accidental deletions. */ deletionProtection?: 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; }>; /** * Information used to configure the Dataproc Metastore service to encrypt * customer data at rest. * Structure is documented below. */ encryptionConfig?: pulumi.Input; /** * The URI of the endpoint used to access the metastore service. */ endpointUri?: pulumi.Input; /** * Configuration information specific to running Hive metastore software as the metastore service. * Structure is documented below. */ hiveMetastoreConfig?: pulumi.Input; /** * User-defined labels for the metastore service. * **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; }>; /** * The location where the metastore service should reside. * The default value is `global`. */ location?: pulumi.Input; /** * The one hour maintenance window of the metastore service. * This specifies when the service can be restarted for maintenance purposes in UTC time. * Maintenance window is not needed for services with the `SPANNER` database type. * Structure is documented below. */ maintenanceWindow?: pulumi.Input; /** * The setting that defines how metastore metadata should be integrated with external services and systems. * Structure is documented below. */ metadataIntegration?: pulumi.Input; /** * The relative resource name of the metastore service. */ name?: pulumi.Input; /** * The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form: * "projects/{projectNumber}/global/networks/{network_id}". */ network?: pulumi.Input; /** * The configuration specifying the network settings for the Dataproc Metastore service. * Structure is documented below. */ networkConfig?: pulumi.Input; /** * The TCP port at which the metastore service is reached. Default: 9083. */ port?: 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; }>; /** * The release channel of the service. If unspecified, defaults to `STABLE`. * Default value is `STABLE`. * Possible values are: `CANARY`, `STABLE`. */ releaseChannel?: pulumi.Input; /** * Represents the scaling configuration of a metastore service. * Structure is documented below. */ scalingConfig?: pulumi.Input; /** * The configuration of scheduled backup for the metastore service. * Structure is documented below. */ scheduledBackup?: pulumi.Input; /** * The ID of the metastore service. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between * 3 and 63 characters. */ serviceId?: pulumi.Input; /** * The current state of the metastore service. */ state?: pulumi.Input; /** * Additional information about the current state of the metastore service, if available. */ stateMessage?: pulumi.Input; /** * 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}. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON. * Structure is documented below. */ telemetryConfig?: pulumi.Input; /** * The tier of the service. * Possible values are: `DEVELOPER`, `ENTERPRISE`. */ tier?: pulumi.Input; /** * The globally unique resource identifier of the metastore service. */ uid?: pulumi.Input; /** * Output only. The time when the metastore service was last updated. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a MetastoreService resource. */ export interface MetastoreServiceArgs { /** * The database type that the Metastore service stores its data. * Default value is `MYSQL`. * Possible values are: `MYSQL`, `SPANNER`. */ databaseType?: pulumi.Input; /** * Indicates if the dataproc metastore should be protected against accidental deletions. */ deletionProtection?: pulumi.Input; /** * Information used to configure the Dataproc Metastore service to encrypt * customer data at rest. * Structure is documented below. */ encryptionConfig?: pulumi.Input; /** * Configuration information specific to running Hive metastore software as the metastore service. * Structure is documented below. */ hiveMetastoreConfig?: pulumi.Input; /** * User-defined labels for the metastore service. * **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; }>; /** * The location where the metastore service should reside. * The default value is `global`. */ location?: pulumi.Input; /** * The one hour maintenance window of the metastore service. * This specifies when the service can be restarted for maintenance purposes in UTC time. * Maintenance window is not needed for services with the `SPANNER` database type. * Structure is documented below. */ maintenanceWindow?: pulumi.Input; /** * The setting that defines how metastore metadata should be integrated with external services and systems. * Structure is documented below. */ metadataIntegration?: pulumi.Input; /** * The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form: * "projects/{projectNumber}/global/networks/{network_id}". */ network?: pulumi.Input; /** * The configuration specifying the network settings for the Dataproc Metastore service. * Structure is documented below. */ networkConfig?: pulumi.Input; /** * The TCP port at which the metastore service is reached. Default: 9083. */ port?: 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 release channel of the service. If unspecified, defaults to `STABLE`. * Default value is `STABLE`. * Possible values are: `CANARY`, `STABLE`. */ releaseChannel?: pulumi.Input; /** * Represents the scaling configuration of a metastore service. * Structure is documented below. */ scalingConfig?: pulumi.Input; /** * The configuration of scheduled backup for the metastore service. * Structure is documented below. */ scheduledBackup?: pulumi.Input; /** * The ID of the metastore service. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between * 3 and 63 characters. */ serviceId?: pulumi.Input; /** * 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}. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON. * Structure is documented below. */ telemetryConfig?: pulumi.Input; /** * The tier of the service. * Possible values are: `DEVELOPER`, `ENTERPRISE`. */ tier?: pulumi.Input; }