@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
489 lines • 18.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A Google Bare Metal Node Pool.
*
* To get more information about BareMetalNodePool, see:
*
* * [API documentation](https://cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.bareMetalClusters.bareMetalNodePools)
*
* ## Example Usage
*
* ### Gkeonprem Bare Metal Node Pool Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const default_basic = new gcp.gkeonprem.BareMetalCluster("default-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",
* ],
* }],
* },
* },
* 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",
* }],
* },
* },
* });
* const nodepool_basic = new gcp.gkeonprem.BareMetalNodePool("nodepool-basic", {
* name: "my-nodepool",
* bareMetalCluster: default_basic.name,
* location: "us-west1",
* nodePoolConfig: {
* operatingSystem: "LINUX",
* nodeConfigs: [{
* nodeIp: "10.200.0.11",
* }],
* },
* });
* ```
* ### Gkeonprem Bare Metal Node Pool Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const default_full = new gcp.gkeonprem.BareMetalCluster("default-full", {
* 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",
* ],
* }],
* },
* },
* 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",
* }],
* },
* },
* });
* const nodepool_full = new gcp.gkeonprem.BareMetalNodePool("nodepool-full", {
* name: "my-nodepool",
* displayName: "test-name",
* bareMetalCluster: default_full.name,
* location: "us-west1",
* annotations: {},
* nodePoolConfig: {
* operatingSystem: "LINUX",
* labels: {},
* nodeConfigs: [{
* nodeIp: "10.200.0.11",
* labels: {},
* }],
* taints: [{
* key: "test-key",
* value: "test-value",
* effect: "NO_EXECUTE",
* }],
* },
* });
* ```
*
* ## Import
*
* BareMetalNodePool can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/bareMetalClusters/{{bare_metal_cluster}}/bareMetalNodePools/{{name}}`
* * `{{project}}/{{location}}/{{bare_metal_cluster}}/{{name}}`
* * `{{location}}/{{bare_metal_cluster}}/{{name}}`
*
* When using the `pulumi import` command, BareMetalNodePool can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:gkeonprem/bareMetalNodePool:BareMetalNodePool default projects/{{project}}/locations/{{location}}/bareMetalClusters/{{bare_metal_cluster}}/bareMetalNodePools/{{name}}
* $ pulumi import gcp:gkeonprem/bareMetalNodePool:BareMetalNodePool default {{project}}/{{location}}/{{bare_metal_cluster}}/{{name}}
* $ pulumi import gcp:gkeonprem/bareMetalNodePool:BareMetalNodePool default {{location}}/{{bare_metal_cluster}}/{{name}}
* ```
*/
export declare class BareMetalNodePool extends pulumi.CustomResource {
/**
* Get an existing BareMetalNodePool 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<pulumi.ID>, state?: BareMetalNodePoolState, opts?: pulumi.CustomResourceOptions): BareMetalNodePool;
/**
* Returns true if the given object is an instance of BareMetalNodePool. 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 BareMetalNodePool;
/**
* Annotations on the Bare Metal Node Pool.
* This field has the same restrictions as Kubernetes annotations.
* The total size of all keys and values combined is limited to 256k.
* Key can have 2 segments: prefix (optional) and name (required),
* separated by a slash (/).
* Prefix must be a DNS subdomain.
* Name must be 63 characters or less, begin and end with alphanumerics,
* with dashes (-), underscores (_), dots (.), and alphanumerics between.
*
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
readonly annotations: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The cluster this node pool belongs to.
*/
readonly bareMetalCluster: pulumi.Output<string>;
/**
* The time the cluster was created, in RFC3339 text format.
*/
readonly createTime: pulumi.Output<string>;
/**
* The time the cluster was deleted, in RFC3339 text format.
*/
readonly deleteTime: pulumi.Output<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* The display name for the Bare Metal Node Pool.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
*/
readonly effectiveAnnotations: pulumi.Output<{
[key: string]: string;
}>;
/**
* This checksum is computed by the server based on the value of other
* fields, and may be sent on update and delete requests to ensure the
* client has an up-to-date value before proceeding.
* Allows clients to perform consistent read-modify-writes
* through optimistic concurrency control.
*/
readonly etag: pulumi.Output<string>;
/**
* The location of the resource.
*/
readonly location: pulumi.Output<string>;
/**
* The bare metal node pool name.
*/
readonly name: pulumi.Output<string>;
/**
* Node pool configuration.
* Structure is documented below.
*/
readonly nodePoolConfig: pulumi.Output<outputs.gkeonprem.BareMetalNodePoolNodePoolConfig>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* If set, there are currently changes in flight to the Bare Metal User Cluster.
*/
readonly reconciling: pulumi.Output<boolean>;
/**
* (Output)
* The lifecycle state of the condition.
*/
readonly state: pulumi.Output<string>;
/**
* Specifies detailed node pool status.
* Structure is documented below.
*/
readonly statuses: pulumi.Output<outputs.gkeonprem.BareMetalNodePoolStatus[]>;
/**
* The unique identifier of the Bare Metal Node Pool.
*/
readonly uid: pulumi.Output<string>;
/**
* The time the cluster was last updated, in RFC3339 text format.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a BareMetalNodePool 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: BareMetalNodePoolArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering BareMetalNodePool resources.
*/
export interface BareMetalNodePoolState {
/**
* Annotations on the Bare Metal Node Pool.
* This field has the same restrictions as Kubernetes annotations.
* The total size of all keys and values combined is limited to 256k.
* Key can have 2 segments: prefix (optional) and name (required),
* separated by a slash (/).
* Prefix must be a DNS subdomain.
* Name must be 63 characters or less, begin and end with alphanumerics,
* with dashes (-), underscores (_), dots (.), and alphanumerics between.
*
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The cluster this node pool belongs to.
*/
bareMetalCluster?: pulumi.Input<string | undefined>;
/**
* The time the cluster was created, in RFC3339 text format.
*/
createTime?: pulumi.Input<string | undefined>;
/**
* The time the cluster was deleted, in RFC3339 text format.
*/
deleteTime?: pulumi.Input<string | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The display name for the Bare Metal Node Pool.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
*/
effectiveAnnotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* This checksum is computed by the server based on the value of other
* fields, and may be sent on update and delete requests to ensure the
* client has an up-to-date value before proceeding.
* Allows clients to perform consistent read-modify-writes
* through optimistic concurrency control.
*/
etag?: pulumi.Input<string | undefined>;
/**
* The location of the resource.
*/
location?: pulumi.Input<string | undefined>;
/**
* The bare metal node pool name.
*/
name?: pulumi.Input<string | undefined>;
/**
* Node pool configuration.
* Structure is documented below.
*/
nodePoolConfig?: pulumi.Input<inputs.gkeonprem.BareMetalNodePoolNodePoolConfig | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* If set, there are currently changes in flight to the Bare Metal User Cluster.
*/
reconciling?: pulumi.Input<boolean | undefined>;
/**
* (Output)
* The lifecycle state of the condition.
*/
state?: pulumi.Input<string | undefined>;
/**
* Specifies detailed node pool status.
* Structure is documented below.
*/
statuses?: pulumi.Input<pulumi.Input<inputs.gkeonprem.BareMetalNodePoolStatus>[] | undefined>;
/**
* The unique identifier of the Bare Metal Node Pool.
*/
uid?: pulumi.Input<string | undefined>;
/**
* The time the cluster was last updated, in RFC3339 text format.
*/
updateTime?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a BareMetalNodePool resource.
*/
export interface BareMetalNodePoolArgs {
/**
* Annotations on the Bare Metal Node Pool.
* This field has the same restrictions as Kubernetes annotations.
* The total size of all keys and values combined is limited to 256k.
* Key can have 2 segments: prefix (optional) and name (required),
* separated by a slash (/).
* Prefix must be a DNS subdomain.
* Name must be 63 characters or less, begin and end with alphanumerics,
* with dashes (-), underscores (_), dots (.), and alphanumerics between.
*
* **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration.
* Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource.
*/
annotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The cluster this node pool belongs to.
*/
bareMetalCluster: pulumi.Input<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The display name for the Bare Metal Node Pool.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* The location of the resource.
*/
location: pulumi.Input<string>;
/**
* The bare metal node pool name.
*/
name?: pulumi.Input<string | undefined>;
/**
* Node pool configuration.
* Structure is documented below.
*/
nodePoolConfig: pulumi.Input<inputs.gkeonprem.BareMetalNodePoolNodePoolConfig>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=bareMetalNodePool.d.ts.map