AwsCluster

An Anthos cluster running on AWS. For more information, see:

Example Usage

Basic_aws_cluster

A basic example of a containeraws cluster

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.ContainerFunctions;
import com.pulumi.gcp.container.inputs.GetAwsVersionsArgs;
import com.pulumi.gcp.container.AwsCluster;
import com.pulumi.gcp.container.AwsClusterArgs;
import com.pulumi.gcp.container.inputs.AwsClusterAuthorizationArgs;
import com.pulumi.gcp.container.inputs.AwsClusterControlPlaneArgs;
import com.pulumi.gcp.container.inputs.AwsClusterControlPlaneAwsServicesAuthenticationArgs;
import com.pulumi.gcp.container.inputs.AwsClusterControlPlaneConfigEncryptionArgs;
import com.pulumi.gcp.container.inputs.AwsClusterControlPlaneDatabaseEncryptionArgs;
import com.pulumi.gcp.container.inputs.AwsClusterControlPlaneMainVolumeArgs;
import com.pulumi.gcp.container.inputs.AwsClusterControlPlaneProxyConfigArgs;
import com.pulumi.gcp.container.inputs.AwsClusterControlPlaneRootVolumeArgs;
import com.pulumi.gcp.container.inputs.AwsClusterControlPlaneSshConfigArgs;
import com.pulumi.gcp.container.inputs.AwsClusterFleetArgs;
import com.pulumi.gcp.container.inputs.AwsClusterNetworkingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var versions = ContainerFunctions.getAwsVersions(GetAwsVersionsArgs.builder()
.location("us-west1")
.project("my-project-name")
.build());
var primary = new AwsCluster("primary", AwsClusterArgs.builder()
.annotations(Map.of("label-one", "value-one"))
.authorization(AwsClusterAuthorizationArgs.builder()
.adminUsers(AwsClusterAuthorizationAdminUserArgs.builder()
.username("emailAddress:my@service-account.com")
.build())
.build())
.awsRegion("my-aws-region")
.controlPlane(AwsClusterControlPlaneArgs.builder()
.awsServicesAuthentication(AwsClusterControlPlaneAwsServicesAuthenticationArgs.builder()
.roleArn("arn:aws:iam::012345678910:role/my--1p-dev-oneplatform")
.roleSessionName("my--1p-dev-session")
.build())
.configEncryption(AwsClusterControlPlaneConfigEncryptionArgs.builder()
.kmsKeyArn("arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111")
.build())
.databaseEncryption(AwsClusterControlPlaneDatabaseEncryptionArgs.builder()
.kmsKeyArn("arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111")
.build())
.iamInstanceProfile("my--1p-dev-controlplane")
.instanceType("t3.medium")
.mainVolume(AwsClusterControlPlaneMainVolumeArgs.builder()
.iops(3000)
.kmsKeyArn("arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111")
.sizeGib(10)
.volumeType("GP3")
.build())
.proxyConfig(AwsClusterControlPlaneProxyConfigArgs.builder()
.secretArn("arn:aws:secretsmanager:us-west-2:126285863215:secret:proxy_config20210824150329476300000001-ABCDEF")
.secretVersion("12345678-ABCD-EFGH-IJKL-987654321098")
.build())
.rootVolume(AwsClusterControlPlaneRootVolumeArgs.builder()
.iops(3000)
.kmsKeyArn("arn:aws:kms:my-aws-region:012345678910:key/12345678-1234-1234-1234-123456789111")
.sizeGib(10)
.volumeType("GP3")
.build())
.securityGroupIds("sg-00000000000000000")
.sshConfig(AwsClusterControlPlaneSshConfigArgs.builder()
.ec2KeyPair("my--1p-dev-ssh")
.build())
.subnetIds("subnet-00000000000000000")
.tags(Map.of("owner", "emailAddress:my@service-account.com"))
.version(versions.applyValue(getAwsVersionsResult -> getAwsVersionsResult.validVersions()[0]))
.build())
.description("A sample aws cluster")
.fleet(AwsClusterFleetArgs.builder()
.project("my-project-number")
.build())
.location("us-west1")
.networking(AwsClusterNetworkingArgs.builder()
.podAddressCidrBlocks("10.2.0.0/16")
.serviceAddressCidrBlocks("10.1.0.0/16")
.vpcId("vpc-00000000000000000")
.build())
.project("my-project-name")
.build());
}
}

Import

Cluster can be imported using any of these accepted formats

$ pulumi import gcp:container/awsCluster:AwsCluster default projects/{{project}}/locations/{{location}}/awsClusters/{{name}}
$ pulumi import gcp:container/awsCluster:AwsCluster default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:container/awsCluster:AwsCluster default {{location}}/{{name}}

Properties

Link copied to clipboard
val annotations: Output<Map<String, String>>?

Optional. Annotations on the 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.

Link copied to clipboard

Configuration related to the cluster RBAC settings.

Link copied to clipboard
val awsRegion: Output<String>

The AWS region where the cluster runs. Each Google Cloud region supports a subset of nearby AWS regions. You can call to list all supported AWS regions within a given Google Cloud region.

Link copied to clipboard

Configuration related to the cluster control plane.

Link copied to clipboard
val createTime: Output<String>

Output only. The time at which this cluster was created.

Link copied to clipboard
val description: Output<String>?

Optional. A human readable description of this cluster. Cannot be longer than 255 UTF-8 encoded bytes.

Link copied to clipboard
val endpoint: Output<String>

Output only. The endpoint of the cluster's API server.

Link copied to clipboard
val etag: Output<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.

Link copied to clipboard
val fleet: Output<AwsClusterFleet>

Fleet configuration.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>

The location for the resource

Link copied to clipboard

(Beta only) Logging configuration.

Link copied to clipboard
val name: Output<String>

The name of this resource.

Link copied to clipboard

Cluster-wide networking configuration.

Link copied to clipboard
val project: Output<String>

The number of the Fleet host project where this cluster will be registered. (Optional) The project for the resource

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val reconciling: Output<Boolean>

Output only. If set, there are currently changes in flight to the cluster.

Link copied to clipboard
val state: Output<String>

Output only. The current state of the cluster. Possible values: STATE_UNSPECIFIED, PROVISIONING, RUNNING, RECONCILING, STOPPING, ERROR, DEGRADED

Link copied to clipboard
val uid: Output<String>

Output only. A globally unique identifier for the cluster.

Link copied to clipboard
val updateTime: Output<String>

Output only. The time at which this cluster was last updated.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Output only. Workload Identity settings.