import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * Manages a Data Proc cluster. For more information, see [the official documentation](https://cloud.yandex.com/docs/data-proc/). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as yandex from "@pulumi/yandex"; * import * from "fs"; * * const fooVpcNetwork = new yandex.VpcNetwork("fooVpcNetwork", {}); * const fooVpcSubnet = new yandex.VpcSubnet("fooVpcSubnet", { * zone: "ru-central1-b", * networkId: fooVpcNetwork.id, * v4CidrBlocks: ["10.1.0.0/24"], * }); * const dataprocIamServiceAccount = new yandex.IamServiceAccount("dataprocIamServiceAccount", {description: "service account to manage Dataproc Cluster"}); * const fooResourcemanagerFolder = yandex.getResourcemanagerFolder({ * folderId: "some_folder_id", * }); * const dataprocResourcemanagerFolderIamBinding = new yandex.ResourcemanagerFolderIamBinding("dataprocResourcemanagerFolderIamBinding", { * folderId: fooResourcemanagerFolder.then(fooResourcemanagerFolder => fooResourcemanagerFolder.id), * role: "mdb.dataproc.agent", * members: [pulumi.interpolate`serviceAccount:${dataprocIamServiceAccount.id}`], * }); * // required in order to create bucket * const bucket_creator = new yandex.ResourcemanagerFolderIamBinding("bucket-creator", { * folderId: fooResourcemanagerFolder.then(fooResourcemanagerFolder => fooResourcemanagerFolder.id), * role: "editor", * members: [pulumi.interpolate`serviceAccount:${dataprocIamServiceAccount.id}`], * }); * const fooIamServiceAccountStaticAccessKey = new yandex.IamServiceAccountStaticAccessKey("fooIamServiceAccountStaticAccessKey", {serviceAccountId: dataprocIamServiceAccount.id}); * const fooStorageBucket = new yandex.StorageBucket("fooStorageBucket", { * bucket: "foo", * accessKey: fooIamServiceAccountStaticAccessKey.accessKey, * secretKey: fooIamServiceAccountStaticAccessKey.secretKey, * }, { * dependsOn: [bucket_creator], * }); * const fooDataprocCluster = new yandex.DataprocCluster("fooDataprocCluster", { * bucket: fooStorageBucket.bucket, * description: "Dataproc Cluster created by Terraform", * labels: { * created_by: "terraform", * }, * serviceAccountId: dataprocIamServiceAccount.id, * zoneId: "ru-central1-b", * clusterConfig: { * hadoop: { * services: [ * "HDFS", * "YARN", * "SPARK", * "TEZ", * "MAPREDUCE", * "HIVE", * ], * properties: { * "yarn:yarn.resourcemanager.am.max-attempts": 5, * }, * sshPublicKeys: [fs.readFileSync("~/.ssh/id_rsa.pub")], * }, * subclusterSpecs: [ * { * name: "main", * role: "MASTERNODE", * resources: { * resourcePresetId: "s2.small", * diskTypeId: "network-hdd", * diskSize: 20, * }, * subnetId: fooVpcSubnet.id, * hostsCount: 1, * }, * { * name: "data", * role: "DATANODE", * resources: { * resourcePresetId: "s2.small", * diskTypeId: "network-hdd", * diskSize: 20, * }, * subnetId: fooVpcSubnet.id, * hostsCount: 2, * }, * { * name: "compute", * role: "COMPUTENODE", * resources: { * resourcePresetId: "s2.small", * diskTypeId: "network-hdd", * diskSize: 20, * }, * subnetId: fooVpcSubnet.id, * hostsCount: 2, * }, * { * name: "compute_autoscaling", * role: "COMPUTENODE", * resources: { * resourcePresetId: "s2.small", * diskTypeId: "network-hdd", * diskSize: 20, * }, * subnetId: fooVpcSubnet.id, * hostsCount: 2, * autoscalingConfig: { * maxHostsCount: 10, * measurementDuration: 60, * warmupDuration: 60, * stabilizationDuration: 120, * preemptible: false, * decommissionTimeout: 60, * }, * }, * ], * }, * }, { * dependsOn: [dataprocResourcemanagerFolderIamBinding], * }); * ``` * * ## Import * * A cluster can be imported using the `id` of the resource, e.g. * * ```sh * $ pulumi import yandex:index/dataprocCluster:DataprocCluster foo cluster_id * ``` */ export declare class DataprocCluster extends pulumi.CustomResource { /** * Get an existing DataprocCluster 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?: DataprocClusterState, opts?: pulumi.CustomResourceOptions): DataprocCluster; /** * Returns true if the given object is an instance of DataprocCluster. 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 DataprocCluster; /** * Name of the Object Storage bucket to use for Data Proc jobs. Data Proc Agent saves output of job driver's process to specified bucket. In order for this to work service account (specified by the `serviceAccountId` argument) should be given permission to create objects within this bucket. */ readonly bucket: pulumi.Output; /** * Configuration and resources for hosts that should be created with the cluster. The structure is documented below. */ readonly clusterConfig: pulumi.Output; /** * (Computed) The Data Proc cluster creation timestamp. * * `cluster_config.0.subcluster_spec.X.id` - (Computed) ID of the subcluster. */ readonly createdAt: pulumi.Output; /** * Inhibits deletion of the cluster. Can be either `true` or `false`. */ readonly deletionProtection: pulumi.Output; /** * Description of the Data Proc cluster. */ readonly description: pulumi.Output; /** * ID of the folder to create a cluster in. If it is not provided, the default provider folder is used. */ readonly folderId: pulumi.Output; /** * A list of host group IDs to place VMs of the cluster on. */ readonly hostGroupIds: pulumi.Output; /** * A set of key/value label pairs to assign to the Data Proc cluster. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Name of the Data Proc subcluster. */ readonly name: pulumi.Output; /** * A list of security group IDs that the cluster belongs to. */ readonly securityGroupIds: pulumi.Output; /** * Service account to be used by the Data Proc agent to access resources of Yandex.Cloud. Selected service account should have `mdb.dataproc.agent` role on the folder where the Data Proc cluster will be located. */ readonly serviceAccountId: pulumi.Output; /** * Whether to enable UI Proxy feature. */ readonly uiProxy: pulumi.Output; /** * ID of the availability zone to create cluster in. If it is not provided, the default provider zone is used. */ readonly zoneId: pulumi.Output; /** * Create a DataprocCluster 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: DataprocClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DataprocCluster resources. */ export interface DataprocClusterState { /** * Name of the Object Storage bucket to use for Data Proc jobs. Data Proc Agent saves output of job driver's process to specified bucket. In order for this to work service account (specified by the `serviceAccountId` argument) should be given permission to create objects within this bucket. */ bucket?: pulumi.Input; /** * Configuration and resources for hosts that should be created with the cluster. The structure is documented below. */ clusterConfig?: pulumi.Input; /** * (Computed) The Data Proc cluster creation timestamp. * * `cluster_config.0.subcluster_spec.X.id` - (Computed) ID of the subcluster. */ createdAt?: pulumi.Input; /** * Inhibits deletion of the cluster. Can be either `true` or `false`. */ deletionProtection?: pulumi.Input; /** * Description of the Data Proc cluster. */ description?: pulumi.Input; /** * ID of the folder to create a cluster in. If it is not provided, the default provider folder is used. */ folderId?: pulumi.Input; /** * A list of host group IDs to place VMs of the cluster on. */ hostGroupIds?: pulumi.Input[]>; /** * A set of key/value label pairs to assign to the Data Proc cluster. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Name of the Data Proc subcluster. */ name?: pulumi.Input; /** * A list of security group IDs that the cluster belongs to. */ securityGroupIds?: pulumi.Input[]>; /** * Service account to be used by the Data Proc agent to access resources of Yandex.Cloud. Selected service account should have `mdb.dataproc.agent` role on the folder where the Data Proc cluster will be located. */ serviceAccountId?: pulumi.Input; /** * Whether to enable UI Proxy feature. */ uiProxy?: pulumi.Input; /** * ID of the availability zone to create cluster in. If it is not provided, the default provider zone is used. */ zoneId?: pulumi.Input; } /** * The set of arguments for constructing a DataprocCluster resource. */ export interface DataprocClusterArgs { /** * Name of the Object Storage bucket to use for Data Proc jobs. Data Proc Agent saves output of job driver's process to specified bucket. In order for this to work service account (specified by the `serviceAccountId` argument) should be given permission to create objects within this bucket. */ bucket?: pulumi.Input; /** * Configuration and resources for hosts that should be created with the cluster. The structure is documented below. */ clusterConfig: pulumi.Input; /** * Inhibits deletion of the cluster. Can be either `true` or `false`. */ deletionProtection?: pulumi.Input; /** * Description of the Data Proc cluster. */ description?: pulumi.Input; /** * ID of the folder to create a cluster in. If it is not provided, the default provider folder is used. */ folderId?: pulumi.Input; /** * A list of host group IDs to place VMs of the cluster on. */ hostGroupIds?: pulumi.Input[]>; /** * A set of key/value label pairs to assign to the Data Proc cluster. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Name of the Data Proc subcluster. */ name?: pulumi.Input; /** * A list of security group IDs that the cluster belongs to. */ securityGroupIds?: pulumi.Input[]>; /** * Service account to be used by the Data Proc agent to access resources of Yandex.Cloud. Selected service account should have `mdb.dataproc.agent` role on the folder where the Data Proc cluster will be located. */ serviceAccountId: pulumi.Input; /** * Whether to enable UI Proxy feature. */ uiProxy?: pulumi.Input; /** * ID of the availability zone to create cluster in. If it is not provided, the default provider zone is used. */ zoneId?: pulumi.Input; }