import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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}} * $ pulumi import gcp:gkeonprem/bareMetalCluster:BareMetalCluster default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:gkeonprem/bareMetalCluster:BareMetalCluster default {{location}}/{{name}} * ``` */ export declare 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: string, id: pulumi.Input, state?: BareMetalClusterState, opts?: pulumi.CustomResourceOptions): BareMetalCluster; /** * 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: any): obj is BareMetalCluster; /** * The Admin Cluster this Bare Metal User Cluster belongs to. * This is the full resource name of the Admin Cluster's hub membership. */ readonly adminClusterMembership: pulumi.Output; /** * Annotations on the Bare Metal User Cluster. * 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>; /** * A human readable description of this Bare Metal User Cluster. */ readonly bareMetalVersion: pulumi.Output; /** * Binary Authorization related configurations. * Structure is documented below. */ readonly binaryAuthorization: pulumi.Output; /** * Specifies the User Cluster's observability infrastructure. * Structure is documented below. */ readonly clusterOperations: pulumi.Output; /** * Specifies the control plane configuration. * Structure is documented below. */ readonly controlPlane: pulumi.Output; /** * The time the cluster was created, in RFC3339 text format. */ readonly createTime: pulumi.Output; /** * The time the cluster was deleted, in RFC3339 text format. */ readonly deleteTime: pulumi.Output; /** * A human readable description of this Bare Metal User Cluster. */ readonly description: pulumi.Output; /** * 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; }>; /** * The IP address name of Bare Metal User Cluster's API server. */ readonly endpoint: pulumi.Output; /** * 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; /** * Fleet related configuration. * Fleets are a Google Cloud concept for logically organizing clusters, * letting you use and manage multi-cluster capabilities and apply * consistent policies across your systems. * See [Anthos Fleets](https://cloud.google.com/anthos/multicluster-management/fleets) for * more details on Anthos multi-cluster capabilities using Fleets. * Structure is documented below. */ readonly fleets: pulumi.Output; /** * Specifies the load balancer configuration. * Structure is documented below. */ readonly loadBalancer: pulumi.Output; /** * The object name of the Bare Metal Cluster custom resource on the * associated admin cluster. This field is used to support conflicting * names when enrolling existing clusters to the API. When used as a part of * cluster enrollment, this field will differ from the ID in the resource * name. For new clusters, this field will match the user provided cluster ID * and be visible in the last component of the resource name. It is not * modifiable. * All users should use this name to access their cluster using gkectl or * kubectl and should expect to see the local name when viewing admin * cluster controller logs. */ readonly localName: pulumi.Output; /** * The location of the resource. */ readonly location: pulumi.Output; /** * Specifies the workload node configurations. * Structure is documented below. */ readonly maintenanceConfig: pulumi.Output; /** * The bare metal cluster name. */ readonly name: pulumi.Output; /** * Network configuration. * Structure is documented below. */ readonly networkConfig: pulumi.Output; /** * Specifies the node access related settings for the bare metal user cluster. * Structure is documented below. */ readonly nodeAccessConfig: pulumi.Output; /** * Specifies the workload node configurations. * Structure is documented below. */ readonly nodeConfig: pulumi.Output; /** * OS environment related configurations. * Structure is documented below. */ readonly osEnvironmentConfig: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * Specifies the cluster proxy configuration. * Structure is documented below. */ readonly proxy: pulumi.Output; /** * If set, there are currently changes in flight to the Bare Metal User Cluster. */ readonly reconciling: pulumi.Output; /** * Specifies the security related settings for the Bare Metal User Cluster. * Structure is documented below. */ readonly securityConfig: pulumi.Output; /** * (Output) * The lifecycle state of the condition. */ readonly state: pulumi.Output; /** * (Output) * Specifies the detailed validation check status * Structure is documented below. */ readonly statuses: pulumi.Output; /** * Specifies the cluster storage configuration. * Structure is documented below. */ readonly storage: pulumi.Output; /** * The unique identifier of the Bare Metal User Cluster. */ readonly uid: pulumi.Output; /** * The time the cluster was last updated, in RFC3339 text format. */ readonly updateTime: pulumi.Output; /** * The cluster upgrade policy. * Structure is documented below. */ readonly upgradePolicy: pulumi.Output; /** * Specifies the security related settings for the Bare Metal User Cluster. * Structure is documented below. */ readonly validationChecks: pulumi.Output; /** * Create a BareMetalCluster 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: BareMetalClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering BareMetalCluster resources. */ export interface BareMetalClusterState { /** * The Admin Cluster this Bare Metal User Cluster belongs to. * This is the full resource name of the Admin Cluster's hub membership. */ adminClusterMembership?: pulumi.Input; /** * Annotations on the Bare Metal User Cluster. * 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; }>; /** * A human readable description of this Bare Metal User Cluster. */ bareMetalVersion?: pulumi.Input; /** * Binary Authorization related configurations. * Structure is documented below. */ binaryAuthorization?: pulumi.Input; /** * Specifies the User Cluster's observability infrastructure. * Structure is documented below. */ clusterOperations?: pulumi.Input; /** * Specifies the control plane configuration. * Structure is documented below. */ controlPlane?: pulumi.Input; /** * The time the cluster was created, in RFC3339 text format. */ createTime?: pulumi.Input; /** * The time the cluster was deleted, in RFC3339 text format. */ deleteTime?: pulumi.Input; /** * A human readable description of this Bare Metal User Cluster. */ description?: pulumi.Input; /** * 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; }>; /** * The IP address name of Bare Metal User Cluster's API server. */ endpoint?: pulumi.Input; /** * 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; /** * Fleet related configuration. * Fleets are a Google Cloud concept for logically organizing clusters, * letting you use and manage multi-cluster capabilities and apply * consistent policies across your systems. * See [Anthos Fleets](https://cloud.google.com/anthos/multicluster-management/fleets) for * more details on Anthos multi-cluster capabilities using Fleets. * Structure is documented below. */ fleets?: pulumi.Input[]>; /** * Specifies the load balancer configuration. * Structure is documented below. */ loadBalancer?: pulumi.Input; /** * The object name of the Bare Metal Cluster custom resource on the * associated admin cluster. This field is used to support conflicting * names when enrolling existing clusters to the API. When used as a part of * cluster enrollment, this field will differ from the ID in the resource * name. For new clusters, this field will match the user provided cluster ID * and be visible in the last component of the resource name. It is not * modifiable. * All users should use this name to access their cluster using gkectl or * kubectl and should expect to see the local name when viewing admin * cluster controller logs. */ localName?: pulumi.Input; /** * The location of the resource. */ location?: pulumi.Input; /** * Specifies the workload node configurations. * Structure is documented below. */ maintenanceConfig?: pulumi.Input; /** * The bare metal cluster name. */ name?: pulumi.Input; /** * Network configuration. * Structure is documented below. */ networkConfig?: pulumi.Input; /** * Specifies the node access related settings for the bare metal user cluster. * Structure is documented below. */ nodeAccessConfig?: pulumi.Input; /** * Specifies the workload node configurations. * Structure is documented below. */ nodeConfig?: pulumi.Input; /** * OS environment related configurations. * Structure is documented below. */ osEnvironmentConfig?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Specifies the cluster proxy configuration. * Structure is documented below. */ proxy?: pulumi.Input; /** * If set, there are currently changes in flight to the Bare Metal User Cluster. */ reconciling?: pulumi.Input; /** * Specifies the security related settings for the Bare Metal User Cluster. * Structure is documented below. */ securityConfig?: pulumi.Input; /** * (Output) * The lifecycle state of the condition. */ state?: pulumi.Input; /** * (Output) * Specifies the detailed validation check status * Structure is documented below. */ statuses?: pulumi.Input[]>; /** * Specifies the cluster storage configuration. * Structure is documented below. */ storage?: pulumi.Input; /** * The unique identifier of the Bare Metal User Cluster. */ uid?: pulumi.Input; /** * The time the cluster was last updated, in RFC3339 text format. */ updateTime?: pulumi.Input; /** * The cluster upgrade policy. * Structure is documented below. */ upgradePolicy?: pulumi.Input; /** * Specifies the security related settings for the Bare Metal User Cluster. * Structure is documented below. */ validationChecks?: pulumi.Input[]>; } /** * The set of arguments for constructing a BareMetalCluster resource. */ export interface BareMetalClusterArgs { /** * The Admin Cluster this Bare Metal User Cluster belongs to. * This is the full resource name of the Admin Cluster's hub membership. */ adminClusterMembership: pulumi.Input; /** * Annotations on the Bare Metal User Cluster. * 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; }>; /** * A human readable description of this Bare Metal User Cluster. */ bareMetalVersion: pulumi.Input; /** * Binary Authorization related configurations. * Structure is documented below. */ binaryAuthorization?: pulumi.Input; /** * Specifies the User Cluster's observability infrastructure. * Structure is documented below. */ clusterOperations?: pulumi.Input; /** * Specifies the control plane configuration. * Structure is documented below. */ controlPlane: pulumi.Input; /** * A human readable description of this Bare Metal User Cluster. */ description?: pulumi.Input; /** * Specifies the load balancer configuration. * Structure is documented below. */ loadBalancer: pulumi.Input; /** * The location of the resource. */ location: pulumi.Input; /** * Specifies the workload node configurations. * Structure is documented below. */ maintenanceConfig?: pulumi.Input; /** * The bare metal cluster name. */ name?: pulumi.Input; /** * Network configuration. * Structure is documented below. */ networkConfig: pulumi.Input; /** * Specifies the node access related settings for the bare metal user cluster. * Structure is documented below. */ nodeAccessConfig?: pulumi.Input; /** * Specifies the workload node configurations. * Structure is documented below. */ nodeConfig?: pulumi.Input; /** * OS environment related configurations. * Structure is documented below. */ osEnvironmentConfig?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Specifies the cluster proxy configuration. * Structure is documented below. */ proxy?: pulumi.Input; /** * Specifies the security related settings for the Bare Metal User Cluster. * Structure is documented below. */ securityConfig?: pulumi.Input; /** * Specifies the cluster storage configuration. * Structure is documented below. */ storage: pulumi.Input; /** * The cluster upgrade policy. * Structure is documented below. */ upgradePolicy?: pulumi.Input; }