"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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.BareMetalCluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A Google Bare Metal User Cluster.
 *
 * To get more information about BareMetalCluster, see:
 *
 * * [API documentation](https://cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters)
 *
 * ## Example Usage
 *
 * ### Gkeonprem Bare Metal Cluster Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cluster_basic = new gcp.gkeonprem.BareMetalCluster("cluster-basic", {
 *     name: "my-cluster",
 *     location: "us-west1",
 *     adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 *     bareMetalVersion: "1.12.3",
 *     networkConfig: {
 *         islandModeCidr: {
 *             serviceAddressCidrBlocks: ["172.26.0.0/16"],
 *             podAddressCidrBlocks: ["10.240.0.0/13"],
 *         },
 *     },
 *     controlPlane: {
 *         controlPlaneNodePoolConfig: {
 *             nodePoolConfig: {
 *                 labels: {},
 *                 operatingSystem: "LINUX",
 *                 nodeConfigs: [{
 *                     labels: {},
 *                     nodeIp: "10.200.0.9",
 *                 }],
 *             },
 *         },
 *     },
 *     loadBalancer: {
 *         portConfig: {
 *             controlPlaneLoadBalancerPort: 443,
 *         },
 *         vipConfig: {
 *             controlPlaneVip: "10.200.0.13",
 *             ingressVip: "10.200.0.14",
 *         },
 *         metalLbConfig: {
 *             addressPools: [{
 *                 pool: "pool1",
 *                 addresses: [
 *                     "10.200.0.14/32",
 *                     "10.200.0.15/32",
 *                     "10.200.0.16/32",
 *                     "10.200.0.17/32",
 *                     "10.200.0.18/32",
 *                     "fd00:1::f/128",
 *                     "fd00:1::10/128",
 *                     "fd00:1::11/128",
 *                     "fd00:1::12/128",
 *                 ],
 *                 avoidBuggyIps: true,
 *                 manualAssign: true,
 *             }],
 *         },
 *     },
 *     storage: {
 *         lvpShareConfig: {
 *             lvpConfig: {
 *                 path: "/mnt/localpv-share",
 *                 storageClass: "local-shared",
 *             },
 *             sharedPathPvCount: 5,
 *         },
 *         lvpNodeMountsConfig: {
 *             path: "/mnt/localpv-disk",
 *             storageClass: "local-disks",
 *         },
 *     },
 *     securityConfig: {
 *         authorization: {
 *             adminUsers: [{
 *                 username: "admin@hashicorptest.com",
 *             }],
 *         },
 *     },
 * });
 * ```
 * ### Gkeonprem Bare Metal Cluster Manuallb
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cluster_manuallb = new gcp.gkeonprem.BareMetalCluster("cluster-manuallb", {
 *     name: "cluster-manuallb",
 *     location: "us-west1",
 *     adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 *     bareMetalVersion: "1.12.3",
 *     networkConfig: {
 *         islandModeCidr: {
 *             serviceAddressCidrBlocks: ["172.26.0.0/16"],
 *             podAddressCidrBlocks: ["10.240.0.0/13"],
 *         },
 *     },
 *     controlPlane: {
 *         controlPlaneNodePoolConfig: {
 *             nodePoolConfig: {
 *                 labels: {},
 *                 operatingSystem: "LINUX",
 *                 nodeConfigs: [{
 *                     labels: {},
 *                     nodeIp: "10.200.0.9",
 *                 }],
 *             },
 *         },
 *     },
 *     loadBalancer: {
 *         portConfig: {
 *             controlPlaneLoadBalancerPort: 443,
 *         },
 *         vipConfig: {
 *             controlPlaneVip: "10.200.0.13",
 *             ingressVip: "10.200.0.14",
 *         },
 *         manualLbConfig: {
 *             enabled: true,
 *         },
 *     },
 *     storage: {
 *         lvpShareConfig: {
 *             lvpConfig: {
 *                 path: "/mnt/localpv-share",
 *                 storageClass: "local-shared",
 *             },
 *             sharedPathPvCount: 5,
 *         },
 *         lvpNodeMountsConfig: {
 *             path: "/mnt/localpv-disk",
 *             storageClass: "local-disks",
 *         },
 *     },
 *     securityConfig: {
 *         authorization: {
 *             adminUsers: [{
 *                 username: "admin@hashicorptest.com",
 *             }],
 *         },
 *     },
 *     binaryAuthorization: {
 *         evaluationMode: "DISABLED",
 *     },
 *     upgradePolicy: {
 *         policy: "SERIAL",
 *     },
 * });
 * ```
 * ### Gkeonprem Bare Metal Cluster Bgplb
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const cluster_bgplb = new gcp.gkeonprem.BareMetalCluster("cluster-bgplb", {
 *     name: "cluster-bgplb",
 *     location: "us-west1",
 *     adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 *     bareMetalVersion: "1.12.3",
 *     networkConfig: {
 *         islandModeCidr: {
 *             serviceAddressCidrBlocks: ["172.26.0.0/16"],
 *             podAddressCidrBlocks: ["10.240.0.0/13"],
 *         },
 *         advancedNetworking: true,
 *         multipleNetworkInterfacesConfig: {
 *             enabled: true,
 *         },
 *         srIovConfig: {
 *             enabled: true,
 *         },
 *     },
 *     controlPlane: {
 *         controlPlaneNodePoolConfig: {
 *             nodePoolConfig: {
 *                 labels: {},
 *                 operatingSystem: "LINUX",
 *                 nodeConfigs: [{
 *                     labels: {},
 *                     nodeIp: "10.200.0.9",
 *                 }],
 *                 taints: [{
 *                     key: "test-key",
 *                     value: "test-value",
 *                     effect: "NO_EXECUTE",
 *                 }],
 *             },
 *         },
 *         apiServerArgs: [{
 *             argument: "test-argument",
 *             value: "test-value",
 *         }],
 *     },
 *     loadBalancer: {
 *         portConfig: {
 *             controlPlaneLoadBalancerPort: 443,
 *         },
 *         vipConfig: {
 *             controlPlaneVip: "10.200.0.13",
 *             ingressVip: "10.200.0.14",
 *         },
 *         bgpLbConfig: {
 *             asn: 123456,
 *             bgpPeerConfigs: [{
 *                 asn: 123457,
 *                 ipAddress: "10.0.0.1",
 *                 controlPlaneNodes: ["test-node"],
 *             }],
 *             addressPools: [{
 *                 pool: "pool1",
 *                 addresses: [
 *                     "10.200.0.14/32",
 *                     "10.200.0.15/32",
 *                     "10.200.0.16/32",
 *                     "10.200.0.17/32",
 *                     "10.200.0.18/32",
 *                     "fd00:1::f/128",
 *                     "fd00:1::10/128",
 *                     "fd00:1::11/128",
 *                     "fd00:1::12/128",
 *                 ],
 *             }],
 *             loadBalancerNodePoolConfig: {
 *                 nodePoolConfig: {
 *                     labels: {},
 *                     operatingSystem: "LINUX",
 *                     nodeConfigs: [{
 *                         labels: {},
 *                         nodeIp: "10.200.0.9",
 *                     }],
 *                     taints: [{
 *                         key: "test-key",
 *                         value: "test-value",
 *                         effect: "NO_EXECUTE",
 *                     }],
 *                     kubeletConfig: {
 *                         registryPullQps: 10,
 *                         registryBurst: 12,
 *                         serializeImagePullsDisabled: true,
 *                     },
 *                 },
 *             },
 *         },
 *     },
 *     storage: {
 *         lvpShareConfig: {
 *             lvpConfig: {
 *                 path: "/mnt/localpv-share",
 *                 storageClass: "local-shared",
 *             },
 *             sharedPathPvCount: 5,
 *         },
 *         lvpNodeMountsConfig: {
 *             path: "/mnt/localpv-disk",
 *             storageClass: "local-disks",
 *         },
 *     },
 *     securityConfig: {
 *         authorization: {
 *             adminUsers: [{
 *                 username: "admin@hashicorptest.com",
 *             }],
 *         },
 *     },
 *     proxy: {
 *         uri: "http://test-domain/test",
 *         noProxies: ["127.0.0.1"],
 *     },
 *     clusterOperations: {
 *         enableApplicationLogs: true,
 *     },
 *     maintenanceConfig: {
 *         maintenanceAddressCidrBlocks: ["192.168.0.1/20"],
 *     },
 *     nodeConfig: {
 *         maxPodsPerNode: 10,
 *         containerRuntime: "CONTAINERD",
 *     },
 *     nodeAccessConfig: {
 *         loginUser: "test@example.com",
 *     },
 *     osEnvironmentConfig: {
 *         packageRepoExcluded: true,
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * BareMetalCluster can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/bareMetalClusters/{{name}}`
 *
 * * `{{project}}/{{location}}/{{name}}`
 *
 * * `{{location}}/{{name}}`
 *
 * When using the `pulumi import` command, BareMetalCluster can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:gkeonprem/bareMetalCluster:BareMetalCluster default projects/{{project}}/locations/{{location}}/bareMetalClusters/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:gkeonprem/bareMetalCluster:BareMetalCluster default {{project}}/{{location}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:gkeonprem/bareMetalCluster:BareMetalCluster default {{location}}/{{name}}
 * ```
 */
class BareMetalCluster extends pulumi.CustomResource {
    /**
     * Get an existing BareMetalCluster 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 BareMetalCluster(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of BareMetalCluster.  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'] === BareMetalCluster.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["adminClusterMembership"] = state?.adminClusterMembership;
            resourceInputs["annotations"] = state?.annotations;
            resourceInputs["bareMetalVersion"] = state?.bareMetalVersion;
            resourceInputs["binaryAuthorization"] = state?.binaryAuthorization;
            resourceInputs["clusterOperations"] = state?.clusterOperations;
            resourceInputs["controlPlane"] = state?.controlPlane;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["deleteTime"] = state?.deleteTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations;
            resourceInputs["endpoint"] = state?.endpoint;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["fleets"] = state?.fleets;
            resourceInputs["loadBalancer"] = state?.loadBalancer;
            resourceInputs["localName"] = state?.localName;
            resourceInputs["location"] = state?.location;
            resourceInputs["maintenanceConfig"] = state?.maintenanceConfig;
            resourceInputs["name"] = state?.name;
            resourceInputs["networkConfig"] = state?.networkConfig;
            resourceInputs["nodeAccessConfig"] = state?.nodeAccessConfig;
            resourceInputs["nodeConfig"] = state?.nodeConfig;
            resourceInputs["osEnvironmentConfig"] = state?.osEnvironmentConfig;
            resourceInputs["project"] = state?.project;
            resourceInputs["proxy"] = state?.proxy;
            resourceInputs["reconciling"] = state?.reconciling;
            resourceInputs["securityConfig"] = state?.securityConfig;
            resourceInputs["state"] = state?.state;
            resourceInputs["statuses"] = state?.statuses;
            resourceInputs["storage"] = state?.storage;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
            resourceInputs["upgradePolicy"] = state?.upgradePolicy;
            resourceInputs["validationChecks"] = state?.validationChecks;
        }
        else {
            const args = argsOrState;
            if (args?.adminClusterMembership === undefined && !opts.urn) {
                throw new Error("Missing required property 'adminClusterMembership'");
            }
            if (args?.bareMetalVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'bareMetalVersion'");
            }
            if (args?.controlPlane === undefined && !opts.urn) {
                throw new Error("Missing required property 'controlPlane'");
            }
            if (args?.loadBalancer === undefined && !opts.urn) {
                throw new Error("Missing required property 'loadBalancer'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.networkConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'networkConfig'");
            }
            if (args?.storage === undefined && !opts.urn) {
                throw new Error("Missing required property 'storage'");
            }
            resourceInputs["adminClusterMembership"] = args?.adminClusterMembership;
            resourceInputs["annotations"] = args?.annotations;
            resourceInputs["bareMetalVersion"] = args?.bareMetalVersion;
            resourceInputs["binaryAuthorization"] = args?.binaryAuthorization;
            resourceInputs["clusterOperations"] = args?.clusterOperations;
            resourceInputs["controlPlane"] = args?.controlPlane;
            resourceInputs["description"] = args?.description;
            resourceInputs["loadBalancer"] = args?.loadBalancer;
            resourceInputs["location"] = args?.location;
            resourceInputs["maintenanceConfig"] = args?.maintenanceConfig;
            resourceInputs["name"] = args?.name;
            resourceInputs["networkConfig"] = args?.networkConfig;
            resourceInputs["nodeAccessConfig"] = args?.nodeAccessConfig;
            resourceInputs["nodeConfig"] = args?.nodeConfig;
            resourceInputs["osEnvironmentConfig"] = args?.osEnvironmentConfig;
            resourceInputs["project"] = args?.project;
            resourceInputs["proxy"] = args?.proxy;
            resourceInputs["securityConfig"] = args?.securityConfig;
            resourceInputs["storage"] = args?.storage;
            resourceInputs["upgradePolicy"] = args?.upgradePolicy;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["deleteTime"] = undefined /*out*/;
            resourceInputs["effectiveAnnotations"] = undefined /*out*/;
            resourceInputs["endpoint"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["fleets"] = undefined /*out*/;
            resourceInputs["localName"] = undefined /*out*/;
            resourceInputs["reconciling"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["statuses"] = undefined /*out*/;
            resourceInputs["uid"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
            resourceInputs["validationChecks"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(BareMetalCluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.BareMetalCluster = BareMetalCluster;
/** @internal */
BareMetalCluster.__pulumiType = 'gcp:gkeonprem/bareMetalCluster:BareMetalCluster';
//# sourceMappingURL=bareMetalCluster.js.map