UNPKG

@pulumi/gcp

Version:

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

308 lines • 12.5 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.BareMetalAdminCluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A Google Bare Metal Admin Cluster. * * ## Example Usage * * ### Gkeonprem Bare Metal Admin Cluster Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const admin_cluster_basic = new gcp.gkeonprem.BareMetalAdminCluster("admin-cluster-basic", { * name: "my-cluster", * location: "us-west1", * bareMetalVersion: "1.13.4", * networkConfig: { * islandModeCidr: { * serviceAddressCidrBlocks: ["172.26.0.0/16"], * podAddressCidrBlocks: ["10.240.0.0/13"], * }, * }, * nodeConfig: { * maxPodsPerNode: 250, * }, * controlPlane: { * controlPlaneNodePoolConfig: { * nodePoolConfig: { * labels: {}, * operatingSystem: "LINUX", * nodeConfigs: [ * { * labels: {}, * nodeIp: "10.200.0.2", * }, * { * labels: {}, * nodeIp: "10.200.0.3", * }, * { * labels: {}, * nodeIp: "10.200.0.4", * }, * ], * }, * }, * }, * loadBalancer: { * portConfig: { * controlPlaneLoadBalancerPort: 443, * }, * vipConfig: { * controlPlaneVip: "10.200.0.5", * }, * }, * storage: { * lvpShareConfig: { * lvpConfig: { * path: "/mnt/localpv-share", * storageClass: "local-shared", * }, * sharedPathPvCount: 5, * }, * lvpNodeMountsConfig: { * path: "/mnt/localpv-disk", * storageClass: "local-disks", * }, * }, * nodeAccessConfig: { * loginUser: "root", * }, * }); * ``` * ### Gkeonprem Bare Metal Admin Cluster Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const admin_cluster_basic = new gcp.gkeonprem.BareMetalAdminCluster("admin-cluster-basic", { * name: "my-cluster", * location: "us-west1", * description: "test description", * bareMetalVersion: "1.13.4", * annotations: { * env: "test", * }, * networkConfig: { * islandModeCidr: { * serviceAddressCidrBlocks: ["172.26.0.0/16"], * podAddressCidrBlocks: ["10.240.0.0/13"], * }, * }, * nodeConfig: { * maxPodsPerNode: 250, * }, * controlPlane: { * controlPlaneNodePoolConfig: { * nodePoolConfig: { * labels: {}, * operatingSystem: "LINUX", * nodeConfigs: [ * { * labels: {}, * nodeIp: "10.200.0.2", * }, * { * labels: {}, * nodeIp: "10.200.0.3", * }, * { * labels: {}, * nodeIp: "10.200.0.4", * }, * ], * 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.5", * }, * manualLbConfig: { * enabled: true, * }, * }, * storage: { * lvpShareConfig: { * lvpConfig: { * path: "/mnt/localpv-share", * storageClass: "local-shared", * }, * sharedPathPvCount: 5, * }, * lvpNodeMountsConfig: { * path: "/mnt/localpv-disk", * storageClass: "local-disks", * }, * }, * nodeAccessConfig: { * loginUser: "root", * }, * securityConfig: { * authorization: { * adminUsers: [{ * username: "admin@hashicorptest.com", * }], * }, * }, * maintenanceConfig: { * maintenanceAddressCidrBlocks: [ * "10.0.0.1/32", * "10.0.0.2/32", * ], * }, * clusterOperations: { * enableApplicationLogs: true, * }, * proxy: { * uri: "test proxy uri", * noProxies: ["127.0.0.1"], * }, * }); * ``` * * ## Import * * BareMetalAdminCluster can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/bareMetalAdminClusters/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, BareMetalAdminCluster can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:gkeonprem/bareMetalAdminCluster:BareMetalAdminCluster default projects/{{project}}/locations/{{location}}/bareMetalAdminClusters/{{name}} * ``` * * ```sh * $ pulumi import gcp:gkeonprem/bareMetalAdminCluster:BareMetalAdminCluster default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:gkeonprem/bareMetalAdminCluster:BareMetalAdminCluster default {{location}}/{{name}} * ``` */ class BareMetalAdminCluster extends pulumi.CustomResource { /** * Get an existing BareMetalAdminCluster 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 BareMetalAdminCluster(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BareMetalAdminCluster. 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'] === BareMetalAdminCluster.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["annotations"] = state ? state.annotations : undefined; resourceInputs["bareMetalVersion"] = state ? state.bareMetalVersion : undefined; resourceInputs["clusterOperations"] = state ? state.clusterOperations : undefined; resourceInputs["controlPlane"] = state ? state.controlPlane : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["deleteTime"] = state ? state.deleteTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["effectiveAnnotations"] = state ? state.effectiveAnnotations : undefined; resourceInputs["endpoint"] = state ? state.endpoint : undefined; resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["fleets"] = state ? state.fleets : undefined; resourceInputs["loadBalancer"] = state ? state.loadBalancer : undefined; resourceInputs["localName"] = state ? state.localName : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["maintenanceConfig"] = state ? state.maintenanceConfig : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networkConfig"] = state ? state.networkConfig : undefined; resourceInputs["nodeAccessConfig"] = state ? state.nodeAccessConfig : undefined; resourceInputs["nodeConfig"] = state ? state.nodeConfig : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["proxy"] = state ? state.proxy : undefined; resourceInputs["reconciling"] = state ? state.reconciling : undefined; resourceInputs["securityConfig"] = state ? state.securityConfig : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["statuses"] = state ? state.statuses : undefined; resourceInputs["storage"] = state ? state.storage : undefined; resourceInputs["uid"] = state ? state.uid : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; resourceInputs["validationChecks"] = state ? state.validationChecks : undefined; } else { const args = argsOrState; if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["annotations"] = args ? args.annotations : undefined; resourceInputs["bareMetalVersion"] = args ? args.bareMetalVersion : undefined; resourceInputs["clusterOperations"] = args ? args.clusterOperations : undefined; resourceInputs["controlPlane"] = args ? args.controlPlane : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["loadBalancer"] = args ? args.loadBalancer : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["maintenanceConfig"] = args ? args.maintenanceConfig : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networkConfig"] = args ? args.networkConfig : undefined; resourceInputs["nodeAccessConfig"] = args ? args.nodeAccessConfig : undefined; resourceInputs["nodeConfig"] = args ? args.nodeConfig : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["proxy"] = args ? args.proxy : undefined; resourceInputs["securityConfig"] = args ? args.securityConfig : undefined; resourceInputs["storage"] = args ? args.storage : undefined; 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(BareMetalAdminCluster.__pulumiType, name, resourceInputs, opts); } } exports.BareMetalAdminCluster = BareMetalAdminCluster; /** @internal */ BareMetalAdminCluster.__pulumiType = 'gcp:gkeonprem/bareMetalAdminCluster:BareMetalAdminCluster'; //# sourceMappingURL=bareMetalAdminCluster.js.map