UNPKG

@pulumi/gcp

Version:

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

240 lines • 12.2 kB
"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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.AzureNodePool = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * An Anthos node pool running on Azure. * * For more information, see: * * [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs) * ## Example Usage * * ### Basic_azure_node_pool * A basic example of a containerazure azure node pool * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const versions = gcp.container.getAzureVersions({ * project: "my-project-name", * location: "us-west1", * }); * const basic = new gcp.container.AzureClient("basic", { * applicationId: "12345678-1234-1234-1234-123456789111", * location: "us-west1", * name: "client-name", * tenantId: "12345678-1234-1234-1234-123456789111", * project: "my-project-name", * }); * const primary = new gcp.container.AzureCluster("primary", { * authorization: { * adminUsers: [{ * username: "mmv2@google.com", * }], * }, * azureRegion: "westus2", * client: pulumi.interpolate`projects/my-project-number/locations/us-west1/azureClients/${basic.name}`, * controlPlane: { * sshConfig: { * authorizedKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8yaayO6lnb2v+SedxUMa2c8vtIEzCzBjM3EJJsv8Vm9zUDWR7dXWKoNGARUb2mNGXASvI6mFIDXTIlkQ0poDEPpMaXR0g2cb5xT8jAAJq7fqXL3+0rcJhY/uigQ+MrT6s+ub0BFVbsmGHNrMQttXX9gtmwkeAEvj3mra9e5pkNf90qlKnZz6U0SVArxVsLx07vHPHDIYrl0OPG4zUREF52igbBPiNrHJFDQJT/4YlDMJmo/QT/A1D6n9ocemvZSzhRx15/Arjowhr+VVKSbaxzPtEfY0oIg2SrqJnnr/l3Du5qIefwh5VmCZe4xopPUaDDoOIEFriZ88sB+3zz8ib8sk8zJJQCgeP78tQvXCgS+4e5W3TUg9mxjB6KjXTyHIVhDZqhqde0OI3Fy1UuVzRUwnBaLjBnAwP5EoFQGRmDYk/rEYe7HTmovLeEBUDQocBQKT4Ripm/xJkkWY7B07K/tfo56dGUCkvyIVXKBInCh+dLK7gZapnd4UWkY0xBYcwo1geMLRq58iFTLA2j/JmpmHXp7m0l7jJii7d44uD3tTIFYThn7NlOnvhLim/YcBK07GMGIN7XwrrKZKmxXaspw6KBWVhzuw1UPxctxshYEaMLfFg/bwOw8HvMPr9VtrElpSB7oiOh91PDIPdPBgHCi7N2QgQ5l/ZDBHieSpNrQ== thomasrodgers", * }, * subnetId: "/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-byo/providers/Microsoft.Network/virtualNetworks/my--dev-vnet/subnets/default", * version: versions.then(versions => versions.validVersions?.[0]), * }, * fleet: { * project: "my-project-number", * }, * location: "us-west1", * name: "name", * networking: { * podAddressCidrBlocks: ["10.200.0.0/16"], * serviceAddressCidrBlocks: ["10.32.0.0/24"], * virtualNetworkId: "/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-byo/providers/Microsoft.Network/virtualNetworks/my--dev-vnet", * }, * resourceGroupId: "/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-cluster", * project: "my-project-name", * }); * const primaryAzureNodePool = new gcp.container.AzureNodePool("primary", { * autoscaling: { * maxNodeCount: 3, * minNodeCount: 2, * }, * cluster: primary.name, * config: { * sshConfig: { * authorizedKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8yaayO6lnb2v+SedxUMa2c8vtIEzCzBjM3EJJsv8Vm9zUDWR7dXWKoNGARUb2mNGXASvI6mFIDXTIlkQ0poDEPpMaXR0g2cb5xT8jAAJq7fqXL3+0rcJhY/uigQ+MrT6s+ub0BFVbsmGHNrMQttXX9gtmwkeAEvj3mra9e5pkNf90qlKnZz6U0SVArxVsLx07vHPHDIYrl0OPG4zUREF52igbBPiNrHJFDQJT/4YlDMJmo/QT/A1D6n9ocemvZSzhRx15/Arjowhr+VVKSbaxzPtEfY0oIg2SrqJnnr/l3Du5qIefwh5VmCZe4xopPUaDDoOIEFriZ88sB+3zz8ib8sk8zJJQCgeP78tQvXCgS+4e5W3TUg9mxjB6KjXTyHIVhDZqhqde0OI3Fy1UuVzRUwnBaLjBnAwP5EoFQGRmDYk/rEYe7HTmovLeEBUDQocBQKT4Ripm/xJkkWY7B07K/tfo56dGUCkvyIVXKBInCh+dLK7gZapnd4UWkY0xBYcwo1geMLRq58iFTLA2j/JmpmHXp7m0l7jJii7d44uD3tTIFYThn7NlOnvhLim/YcBK07GMGIN7XwrrKZKmxXaspw6KBWVhzuw1UPxctxshYEaMLfFg/bwOw8HvMPr9VtrElpSB7oiOh91PDIPdPBgHCi7N2QgQ5l/ZDBHieSpNrQ== thomasrodgers", * }, * proxyConfig: { * resourceGroupId: "/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-cluster", * secretId: "https://my--dev-keyvault.vault.azure.net/secrets/my--dev-secret/0000000000000000000000000000000000", * }, * rootVolume: { * sizeGib: 32, * }, * tags: { * owner: "mmv2", * }, * labels: { * key_one: "label_one", * }, * vmSize: "Standard_DS2_v2", * }, * location: "us-west1", * maxPodsConstraint: { * maxPodsPerNode: 110, * }, * name: "node-pool-name", * subnetId: "/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-byo/providers/Microsoft.Network/virtualNetworks/my--dev-vnet/subnets/default", * version: versions.then(versions => versions.validVersions?.[0]), * annotations: { * "annotation-one": "value-one", * }, * management: { * autoRepair: true, * }, * project: "my-project-name", * }); * ``` * * ## Import * * NodePool can be imported using any of these accepted formats: * * `projects/{{project}}/locations/{{location}}/azureClusters/{{cluster}}/azureNodePools/{{name}}` * * `{{project}}/{{location}}/{{cluster}}/{{name}}` * * `{{location}}/{{cluster}}/{{name}}` * * When using the `pulumi import` command, NodePool can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:container/azureNodePool:AzureNodePool default projects/{{project}}/locations/{{location}}/azureClusters/{{cluster}}/azureNodePools/{{name}} * $ pulumi import gcp:container/azureNodePool:AzureNodePool default {{project}}/{{location}}/{{cluster}}/{{name}} * $ pulumi import gcp:container/azureNodePool:AzureNodePool default {{location}}/{{cluster}}/{{name}} * ``` */ class AzureNodePool extends pulumi.CustomResource { /** * Get an existing AzureNodePool 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 AzureNodePool(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:container/azureNodePool:AzureNodePool'; /** * Returns true if the given object is an instance of AzureNodePool. 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'] === AzureNodePool.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["annotations"] = state?.annotations; resourceInputs["autoscaling"] = state?.autoscaling; resourceInputs["azureAvailabilityZone"] = state?.azureAvailabilityZone; resourceInputs["cluster"] = state?.cluster; resourceInputs["config"] = state?.config; resourceInputs["createTime"] = state?.createTime; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations; resourceInputs["etag"] = state?.etag; resourceInputs["location"] = state?.location; resourceInputs["management"] = state?.management; resourceInputs["maxPodsConstraint"] = state?.maxPodsConstraint; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["reconciling"] = state?.reconciling; resourceInputs["state"] = state?.state; resourceInputs["subnetId"] = state?.subnetId; resourceInputs["uid"] = state?.uid; resourceInputs["updateTime"] = state?.updateTime; resourceInputs["version"] = state?.version; } else { const args = argsOrState; if (args?.autoscaling === undefined && !opts.urn) { throw new Error("Missing required property 'autoscaling'"); } if (args?.cluster === undefined && !opts.urn) { throw new Error("Missing required property 'cluster'"); } if (args?.config === undefined && !opts.urn) { throw new Error("Missing required property 'config'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.maxPodsConstraint === undefined && !opts.urn) { throw new Error("Missing required property 'maxPodsConstraint'"); } if (args?.subnetId === undefined && !opts.urn) { throw new Error("Missing required property 'subnetId'"); } if (args?.version === undefined && !opts.urn) { throw new Error("Missing required property 'version'"); } resourceInputs["annotations"] = args?.annotations; resourceInputs["autoscaling"] = args?.autoscaling; resourceInputs["azureAvailabilityZone"] = args?.azureAvailabilityZone; resourceInputs["cluster"] = args?.cluster; resourceInputs["config"] = args?.config; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["location"] = args?.location; resourceInputs["management"] = args?.management; resourceInputs["maxPodsConstraint"] = args?.maxPodsConstraint; resourceInputs["name"] = args?.name; resourceInputs["project"] = args?.project; resourceInputs["subnetId"] = args?.subnetId; resourceInputs["version"] = args?.version; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["effectiveAnnotations"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["reconciling"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["uid"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AzureNodePool.__pulumiType, name, resourceInputs, opts); } } exports.AzureNodePool = AzureNodePool; //# sourceMappingURL=azureNodePool.js.map