"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AwsCluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An Anthos cluster 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 cluster
 * ```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",
 *         }],
 *         adminGroups: [{
 *             group: "group@domain.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",
 * });
 * ```
 * ### Basic_enum_aws_cluster
 * A basic example of a containeraws cluster 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",
 * });
 * ```
 * ### Beta_basic_enum_aws_cluster
 * A basic example of a containeraws cluster 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",
 *         },
 *         instancePlacement: {
 *             tenancy: "dedicated",
 *         },
 *     },
 *     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",
 *     loggingConfig: {
 *         componentConfig: {
 *             enableComponents: [
 *                 "system_components",
 *                 "workloads",
 *             ],
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Cluster can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/awsClusters/{{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/awsCluster:AwsCluster default projects/{{project}}/locations/{{location}}/awsClusters/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:container/awsCluster:AwsCluster default {{project}}/{{location}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:container/awsCluster:AwsCluster default {{location}}/{{name}}
 * ```
 */
class AwsCluster extends pulumi.CustomResource {
    /**
     * Get an existing AwsCluster 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 AwsCluster(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AwsCluster.  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'] === AwsCluster.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["annotations"] = state?.annotations;
            resourceInputs["authorization"] = state?.authorization;
            resourceInputs["awsRegion"] = state?.awsRegion;
            resourceInputs["binaryAuthorization"] = state?.binaryAuthorization;
            resourceInputs["controlPlane"] = state?.controlPlane;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations;
            resourceInputs["endpoint"] = state?.endpoint;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["fleet"] = state?.fleet;
            resourceInputs["location"] = state?.location;
            resourceInputs["loggingConfig"] = state?.loggingConfig;
            resourceInputs["name"] = state?.name;
            resourceInputs["networking"] = state?.networking;
            resourceInputs["project"] = state?.project;
            resourceInputs["reconciling"] = state?.reconciling;
            resourceInputs["state"] = state?.state;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
            resourceInputs["workloadIdentityConfigs"] = state?.workloadIdentityConfigs;
        }
        else {
            const args = argsOrState;
            if (args?.authorization === undefined && !opts.urn) {
                throw new Error("Missing required property 'authorization'");
            }
            if (args?.awsRegion === undefined && !opts.urn) {
                throw new Error("Missing required property 'awsRegion'");
            }
            if (args?.controlPlane === undefined && !opts.urn) {
                throw new Error("Missing required property 'controlPlane'");
            }
            if (args?.fleet === undefined && !opts.urn) {
                throw new Error("Missing required property 'fleet'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.networking === undefined && !opts.urn) {
                throw new Error("Missing required property 'networking'");
            }
            resourceInputs["annotations"] = args?.annotations;
            resourceInputs["authorization"] = args?.authorization;
            resourceInputs["awsRegion"] = args?.awsRegion;
            resourceInputs["binaryAuthorization"] = args?.binaryAuthorization;
            resourceInputs["controlPlane"] = args?.controlPlane;
            resourceInputs["description"] = args?.description;
            resourceInputs["fleet"] = args?.fleet;
            resourceInputs["location"] = args?.location;
            resourceInputs["loggingConfig"] = args?.loggingConfig;
            resourceInputs["name"] = args?.name;
            resourceInputs["networking"] = args?.networking;
            resourceInputs["project"] = args?.project;
            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(AwsCluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AwsCluster = AwsCluster;
/** @internal */
AwsCluster.__pulumiType = 'gcp:container/awsCluster:AwsCluster';
//# sourceMappingURL=awsCluster.js.map