import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * An Anthos node pool running on AWS. * * For more information, see: * * [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs) * ## Example Usage * * ### Basic_aws_cluster * A basic example of a containeraws node pool * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const versions = gcp.container.getAwsVersions({ * project: "my-project-name", * location: "us-west1", * }); * const primary = new gcp.container.AwsCluster("primary", { * authorization: { * adminUsers: [{ * username: "my@service-account.com", * }], * }, * awsRegion: "my-aws-region", * controlPlane: { * awsServicesAuthentication: { * roleArn: "arn:aws:iam::012345678910:role/my--1p-dev-oneplatform", * roleSessionName: "my--1p-dev-session", * }, * configEncryption: { * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * }, * databaseEncryption: { * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * }, * iamInstanceProfile: "my--1p-dev-controlplane", * subnetIds: ["subnet-00000000000000000"], * version: versions.then(versions => versions.validVersions?.[0]), * instanceType: "t3.medium", * mainVolume: { * iops: 3000, * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * sizeGib: 10, * volumeType: "GP3", * }, * proxyConfig: { * secretArn: "arn:aws:secretsmanager:us-west-2:126285863215:secret:proxy_config20210824150329476300000001-ABCDEF", * secretVersion: "12345678-ABCD-EFGH-IJKL-987654321098", * }, * rootVolume: { * iops: 3000, * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * sizeGib: 10, * volumeType: "GP3", * }, * securityGroupIds: ["sg-00000000000000000"], * sshConfig: { * ec2KeyPair: "my--1p-dev-ssh", * }, * tags: { * owner: "my@service-account.com", * }, * }, * fleet: { * project: "my-project-number", * }, * location: "us-west1", * name: "name", * networking: { * podAddressCidrBlocks: ["10.2.0.0/16"], * serviceAddressCidrBlocks: ["10.1.0.0/16"], * vpcId: "vpc-00000000000000000", * }, * annotations: { * "label-one": "value-one", * }, * description: "A sample aws cluster", * project: "my-project-name", * }); * const primaryAwsNodePool = new gcp.container.AwsNodePool("primary", { * autoscaling: { * maxNodeCount: 5, * minNodeCount: 1, * }, * cluster: primary.name, * config: { * configEncryption: { * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * }, * iamInstanceProfile: "my--1p-dev-nodepool", * instanceType: "t3.medium", * labels: { * "label-one": "value-one", * }, * rootVolume: { * iops: 3000, * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * sizeGib: 10, * volumeType: "GP3", * }, * securityGroupIds: ["sg-00000000000000000"], * proxyConfig: { * secretArn: "arn:aws:secretsmanager:us-west-2:126285863215:secret:proxy_config20210824150329476300000001-ABCDEF", * secretVersion: "12345678-ABCD-EFGH-IJKL-987654321098", * }, * sshConfig: { * ec2KeyPair: "my--1p-dev-ssh", * }, * tags: { * "tag-one": "value-one", * }, * taints: [{ * effect: "PREFER_NO_SCHEDULE", * key: "taint-key", * value: "taint-value", * }], * }, * location: "us-west1", * maxPodsConstraint: { * maxPodsPerNode: 110, * }, * name: "node-pool-name", * subnetId: "subnet-00000000000000000", * version: versions.then(versions => versions.validVersions?.[0]), * annotations: { * "label-one": "value-one", * }, * management: { * autoRepair: true, * }, * kubeletConfig: { * cpuManagerPolicy: "none", * cpuCfsQuota: true, * cpuCfsQuotaPeriod: "100ms", * podPidsLimit: 1024, * }, * project: "my-project-name", * }); * ``` * ### Basic_enum_aws_cluster * A basic example of a containeraws node pool with lowercase enums * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const versions = gcp.container.getAwsVersions({ * project: "my-project-name", * location: "us-west1", * }); * const primary = new gcp.container.AwsCluster("primary", { * authorization: { * adminUsers: [{ * username: "my@service-account.com", * }], * }, * awsRegion: "my-aws-region", * controlPlane: { * awsServicesAuthentication: { * roleArn: "arn:aws:iam::012345678910:role/my--1p-dev-oneplatform", * roleSessionName: "my--1p-dev-session", * }, * configEncryption: { * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * }, * databaseEncryption: { * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * }, * iamInstanceProfile: "my--1p-dev-controlplane", * subnetIds: ["subnet-00000000000000000"], * version: versions.then(versions => versions.validVersions?.[0]), * instanceType: "t3.medium", * mainVolume: { * iops: 3000, * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * sizeGib: 10, * volumeType: "GP3", * }, * proxyConfig: { * secretArn: "arn:aws:secretsmanager:us-west-2:126285863215:secret:proxy_config20210824150329476300000001-ABCDEF", * secretVersion: "12345678-ABCD-EFGH-IJKL-987654321098", * }, * rootVolume: { * iops: 3000, * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * sizeGib: 10, * volumeType: "GP3", * }, * securityGroupIds: ["sg-00000000000000000"], * sshConfig: { * ec2KeyPair: "my--1p-dev-ssh", * }, * tags: { * owner: "my@service-account.com", * }, * }, * fleet: { * project: "my-project-number", * }, * location: "us-west1", * name: "name", * networking: { * podAddressCidrBlocks: ["10.2.0.0/16"], * serviceAddressCidrBlocks: ["10.1.0.0/16"], * vpcId: "vpc-00000000000000000", * }, * annotations: { * "label-one": "value-one", * }, * description: "A sample aws cluster", * project: "my-project-name", * }); * const primaryAwsNodePool = new gcp.container.AwsNodePool("primary", { * autoscaling: { * maxNodeCount: 5, * minNodeCount: 1, * }, * cluster: primary.name, * config: { * configEncryption: { * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * }, * iamInstanceProfile: "my--1p-dev-nodepool", * instanceType: "t3.medium", * labels: { * "label-one": "value-one", * }, * rootVolume: { * iops: 3000, * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * sizeGib: 10, * volumeType: "gp3", * }, * securityGroupIds: ["sg-00000000000000000"], * proxyConfig: { * secretArn: "arn:aws:secretsmanager:us-west-2:126285863215:secret:proxy_config20210824150329476300000001-ABCDEF", * secretVersion: "12345678-ABCD-EFGH-IJKL-987654321098", * }, * sshConfig: { * ec2KeyPair: "my--1p-dev-ssh", * }, * tags: { * "tag-one": "value-one", * }, * taints: [{ * effect: "prefer_no_schedule", * key: "taint-key", * value: "taint-value", * }], * }, * location: "us-west1", * maxPodsConstraint: { * maxPodsPerNode: 110, * }, * name: "node-pool-name", * subnetId: "subnet-00000000000000000", * version: versions.then(versions => versions.validVersions?.[0]), * annotations: { * "label-one": "value-one", * }, * project: "my-project-name", * }); * ``` * ### Beta_basic_enum_aws_cluster * A basic example of a containeraws node pool with lowercase enums (beta) * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const versions = gcp.container.getAwsVersions({ * project: "my-project-name", * location: "us-west1", * }); * const primary = new gcp.container.AwsCluster("primary", { * authorization: { * adminUsers: [{ * username: "my@service-account.com", * }], * }, * awsRegion: "my-aws-region", * controlPlane: { * awsServicesAuthentication: { * roleArn: "arn:aws:iam::012345678910:role/my--1p-dev-oneplatform", * roleSessionName: "my--1p-dev-session", * }, * configEncryption: { * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * }, * databaseEncryption: { * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * }, * iamInstanceProfile: "my--1p-dev-controlplane", * subnetIds: ["subnet-00000000000000000"], * version: versions.then(versions => versions.validVersions?.[0]), * instanceType: "t3.medium", * mainVolume: { * iops: 3000, * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * sizeGib: 10, * volumeType: "GP3", * }, * proxyConfig: { * secretArn: "arn:aws:secretsmanager:us-west-2:126285863215:secret:proxy_config20210824150329476300000001-ABCDEF", * secretVersion: "12345678-ABCD-EFGH-IJKL-987654321098", * }, * rootVolume: { * iops: 3000, * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * sizeGib: 10, * volumeType: "GP3", * }, * securityGroupIds: ["sg-00000000000000000"], * sshConfig: { * ec2KeyPair: "my--1p-dev-ssh", * }, * tags: { * owner: "my@service-account.com", * }, * }, * fleet: { * project: "my-project-number", * }, * location: "us-west1", * name: "name", * networking: { * podAddressCidrBlocks: ["10.2.0.0/16"], * serviceAddressCidrBlocks: ["10.1.0.0/16"], * vpcId: "vpc-00000000000000000", * }, * annotations: { * "label-one": "value-one", * }, * description: "A sample aws cluster", * project: "my-project-name", * }); * const primaryAwsNodePool = new gcp.container.AwsNodePool("primary", { * autoscaling: { * maxNodeCount: 5, * minNodeCount: 1, * }, * cluster: primary.name, * config: { * configEncryption: { * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * }, * iamInstanceProfile: "my--1p-dev-nodepool", * instanceType: "t3.medium", * labels: { * "label-one": "value-one", * }, * rootVolume: { * iops: 3000, * kmsKeyArn: "arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111", * sizeGib: 10, * volumeType: "gp3", * }, * securityGroupIds: ["sg-00000000000000000"], * proxyConfig: { * secretArn: "arn:aws:secretsmanager:us-west-2:126285863215:secret:proxy_config20210824150329476300000001-ABCDEF", * secretVersion: "12345678-ABCD-EFGH-IJKL-987654321098", * }, * sshConfig: { * ec2KeyPair: "my--1p-dev-ssh", * }, * tags: { * "tag-one": "value-one", * }, * taints: [{ * effect: "prefer_no_schedule", * key: "taint-key", * value: "taint-value", * }], * instancePlacement: { * tenancy: "dedicated", * }, * imageType: "ubuntu", * }, * location: "us-west1", * maxPodsConstraint: { * maxPodsPerNode: 110, * }, * name: "node-pool-name", * subnetId: "subnet-00000000000000000", * version: versions.then(versions => versions.validVersions?.[0]), * annotations: { * "label-one": "value-one", * }, * project: "my-project-name", * }); * ``` * * ## Import * * NodePool can be imported using any of these accepted formats: * * `projects/{{project}}/locations/{{location}}/awsClusters/{{cluster}}/awsNodePools/{{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/awsNodePool:AwsNodePool default projects/{{project}}/locations/{{location}}/awsClusters/{{cluster}}/awsNodePools/{{name}} * $ pulumi import gcp:container/awsNodePool:AwsNodePool default {{project}}/{{location}}/{{cluster}}/{{name}} * $ pulumi import gcp:container/awsNodePool:AwsNodePool default {{location}}/{{cluster}}/{{name}} * ``` */ export declare class AwsNodePool extends pulumi.CustomResource { /** * Get an existing AwsNodePool 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?: AwsNodePoolState, opts?: pulumi.CustomResourceOptions): AwsNodePool; /** * Returns true if the given object is an instance of AwsNodePool. 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 AwsNodePool; /** * Optional. Annotations on the 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>; /** * Autoscaler configuration for this node pool. */ readonly autoscaling: pulumi.Output; /** * The awsCluster for the resource */ readonly cluster: pulumi.Output; /** * The configuration of the node pool. */ readonly config: pulumi.Output; /** * Output only. The time at which this node pool was created. */ readonly createTime: 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; }>; /** * Allows clients to perform consistent read-modify-writes through optimistic concurrency control. May be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. */ readonly etag: pulumi.Output; /** * The kubelet configuration for the node pool. */ readonly kubeletConfig: pulumi.Output; /** * The location for the resource */ readonly location: pulumi.Output; /** * The Management configuration for this node pool. */ readonly management: pulumi.Output; /** * The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. */ readonly maxPodsConstraint: pulumi.Output; /** * The name of this resource. */ readonly name: pulumi.Output; /** * The project for the resource */ readonly project: pulumi.Output; /** * Output only. If set, there are currently changes in flight to the node pool. */ readonly reconciling: pulumi.Output; /** * Output only. The lifecycle state of the node pool. Possible values: STATE_UNSPECIFIED, PROVISIONING, RUNNING, RECONCILING, STOPPING, ERROR, DEGRADED */ readonly state: pulumi.Output; /** * The subnet where the node pool node run. */ readonly subnetId: pulumi.Output; /** * Output only. A globally unique identifier for the node pool. */ readonly uid: pulumi.Output; /** * Optional. Update settings control the speed and disruption of the node pool update. */ readonly updateSettings: pulumi.Output; /** * Output only. The time at which this node pool was last updated. */ readonly updateTime: pulumi.Output; /** * The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`). You can list all supported versions on a given Google Cloud region by calling GetAwsServerConfig. */ readonly version: pulumi.Output; /** * Create a AwsNodePool 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: AwsNodePoolArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AwsNodePool resources. */ export interface AwsNodePoolState { /** * Optional. Annotations on the 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; }>; /** * Autoscaler configuration for this node pool. */ autoscaling?: pulumi.Input; /** * The awsCluster for the resource */ cluster?: pulumi.Input; /** * The configuration of the node pool. */ config?: pulumi.Input; /** * Output only. The time at which this node pool was created. */ createTime?: 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; }>; /** * Allows clients to perform consistent read-modify-writes through optimistic concurrency control. May be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. */ etag?: pulumi.Input; /** * The kubelet configuration for the node pool. */ kubeletConfig?: pulumi.Input; /** * The location for the resource */ location?: pulumi.Input; /** * The Management configuration for this node pool. */ management?: pulumi.Input; /** * The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. */ maxPodsConstraint?: pulumi.Input; /** * The name of this resource. */ name?: pulumi.Input; /** * The project for the resource */ project?: pulumi.Input; /** * Output only. If set, there are currently changes in flight to the node pool. */ reconciling?: pulumi.Input; /** * Output only. The lifecycle state of the node pool. Possible values: STATE_UNSPECIFIED, PROVISIONING, RUNNING, RECONCILING, STOPPING, ERROR, DEGRADED */ state?: pulumi.Input; /** * The subnet where the node pool node run. */ subnetId?: pulumi.Input; /** * Output only. A globally unique identifier for the node pool. */ uid?: pulumi.Input; /** * Optional. Update settings control the speed and disruption of the node pool update. */ updateSettings?: pulumi.Input; /** * Output only. The time at which this node pool was last updated. */ updateTime?: pulumi.Input; /** * The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`). You can list all supported versions on a given Google Cloud region by calling GetAwsServerConfig. */ version?: pulumi.Input; } /** * The set of arguments for constructing a AwsNodePool resource. */ export interface AwsNodePoolArgs { /** * Optional. Annotations on the 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; }>; /** * Autoscaler configuration for this node pool. */ autoscaling: pulumi.Input; /** * The awsCluster for the resource */ cluster: pulumi.Input; /** * The configuration of the node pool. */ config: pulumi.Input; /** * The kubelet configuration for the node pool. */ kubeletConfig?: pulumi.Input; /** * The location for the resource */ location: pulumi.Input; /** * The Management configuration for this node pool. */ management?: pulumi.Input; /** * The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. */ maxPodsConstraint: pulumi.Input; /** * The name of this resource. */ name?: pulumi.Input; /** * The project for the resource */ project?: pulumi.Input; /** * The subnet where the node pool node run. */ subnetId: pulumi.Input; /** * Optional. Update settings control the speed and disruption of the node pool update. */ updateSettings?: pulumi.Input; /** * The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`). You can list all supported versions on a given Google Cloud region by calling GetAwsServerConfig. */ version: pulumi.Input; }