UNPKG

@pulumi/gcp

Version:

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

249 lines • 13.1 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.AzureCluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * An Anthos cluster running on Azure. * * For more information, see: * * [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs) * ## Example Usage * * ### Basic_azure_cluster * A basic example of a containerazure azure cluster * ```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", * }], * adminGroups: [{ * group: "group@domain.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", * }); * ``` * ### Beta_basic_enum_azure_cluster * A basic example of a containerazure azure cluster with lowercase enums (beta) * ```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", * loggingConfig: { * componentConfig: { * enableComponents: [ * "system_components", * "workloads", * ], * }, * }, * }); * ``` * * ## Import * * Cluster can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/azureClusters/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Cluster can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:container/azureCluster:AzureCluster default projects/{{project}}/locations/{{location}}/azureClusters/{{name}} * ``` * * ```sh * $ pulumi import gcp:container/azureCluster:AzureCluster default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:container/azureCluster:AzureCluster default {{location}}/{{name}} * ``` */ class AzureCluster extends pulumi.CustomResource { /** * Get an existing AzureCluster 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 AzureCluster(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AzureCluster. 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'] === AzureCluster.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["annotations"] = state ? state.annotations : undefined; resourceInputs["authorization"] = state ? state.authorization : undefined; resourceInputs["azureRegion"] = state ? state.azureRegion : undefined; resourceInputs["azureServicesAuthentication"] = state ? state.azureServicesAuthentication : undefined; resourceInputs["client"] = state ? state.client : undefined; resourceInputs["controlPlane"] = state ? state.controlPlane : undefined; resourceInputs["createTime"] = state ? state.createTime : 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["fleet"] = state ? state.fleet : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["loggingConfig"] = state ? state.loggingConfig : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networking"] = state ? state.networking : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["reconciling"] = state ? state.reconciling : undefined; resourceInputs["resourceGroupId"] = state ? state.resourceGroupId : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["uid"] = state ? state.uid : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; resourceInputs["workloadIdentityConfigs"] = state ? state.workloadIdentityConfigs : undefined; } else { const args = argsOrState; if ((!args || args.authorization === undefined) && !opts.urn) { throw new Error("Missing required property 'authorization'"); } if ((!args || args.azureRegion === undefined) && !opts.urn) { throw new Error("Missing required property 'azureRegion'"); } if ((!args || args.controlPlane === undefined) && !opts.urn) { throw new Error("Missing required property 'controlPlane'"); } if ((!args || args.fleet === undefined) && !opts.urn) { throw new Error("Missing required property 'fleet'"); } if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } if ((!args || args.networking === undefined) && !opts.urn) { throw new Error("Missing required property 'networking'"); } if ((!args || args.resourceGroupId === undefined) && !opts.urn) { throw new Error("Missing required property 'resourceGroupId'"); } resourceInputs["annotations"] = args ? args.annotations : undefined; resourceInputs["authorization"] = args ? args.authorization : undefined; resourceInputs["azureRegion"] = args ? args.azureRegion : undefined; resourceInputs["azureServicesAuthentication"] = args ? args.azureServicesAuthentication : undefined; resourceInputs["client"] = args ? args.client : undefined; resourceInputs["controlPlane"] = args ? args.controlPlane : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["fleet"] = args ? args.fleet : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["loggingConfig"] = args ? args.loggingConfig : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networking"] = args ? args.networking : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["resourceGroupId"] = args ? args.resourceGroupId : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["effectiveAnnotations"] = undefined /*out*/; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["reconciling"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["uid"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; resourceInputs["workloadIdentityConfigs"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AzureCluster.__pulumiType, name, resourceInputs, opts); } } exports.AzureCluster = AzureCluster; /** @internal */ AzureCluster.__pulumiType = 'gcp:container/azureCluster:AzureCluster'; //# sourceMappingURL=azureCluster.js.map