import * as core from "@terrascript/core"; export interface KubernetesNetworkConfigArgs extends core.SchemaArgs { ipFamily?: string | core.StringOut; serviceIpv4Cidr?: string | core.StringOut; } export class KubernetesNetworkConfig extends core.Schema { @core.attr(String, { computed: true }) public ipFamily?: string | core.StringOut; @core.attr(String, { computed: true }) public serviceIpv4Cidr?: string | core.StringOut; } export interface VpcConfigArgs extends core.SchemaArgs { clusterSecurityGroupId: string | core.StringOut; endpointPrivateAccess?: boolean | core.BooleanOut; endpointPublicAccess?: boolean | core.BooleanOut; publicAccessCidrs?: core.Array | core.ArrayOut; securityGroupIds?: core.Array | core.ArrayOut; subnetIds: core.Array | core.ArrayOut; vpcId: string | core.StringOut; } export class VpcConfig extends core.Schema { @core.attr(String, { computed: true }) public clusterSecurityGroupId!: string | core.StringOut; @core.attr(Boolean) public endpointPrivateAccess?: boolean | core.BooleanOut; @core.attr(Boolean) public endpointPublicAccess?: boolean | core.BooleanOut; @core.attr(String, { computed: true, kind: "array" }) public publicAccessCidrs?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public securityGroupIds?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public subnetIds!: core.Array | core.ArrayOut; @core.attr(String, { computed: true }) public vpcId!: string | core.StringOut; } export interface OidcArgs extends core.SchemaArgs { issuer: string | core.StringOut; } export class Oidc extends core.Schema { @core.attr(String, { computed: true }) public issuer!: string | core.StringOut; } export interface IdentityArgs extends core.SchemaArgs { oidc: core.Array | core.ArrayOut; } export class Identity extends core.Schema { @core.attr(Oidc, { computed: true, kind: "array" }) public oidc!: core.Array | core.ArrayOut; } export interface CertificateAuthorityArgs extends core.SchemaArgs { data: string | core.StringOut; } export class CertificateAuthority extends core.Schema { @core.attr(String, { computed: true }) public data!: string | core.StringOut; } export interface ProviderArgs extends core.SchemaArgs { keyArn: string | core.StringOut; } export class Provider extends core.Schema { @core.attr(String) public keyArn!: string | core.StringOut; } export interface EncryptionConfigArgs extends core.SchemaArgs { provider: Provider; resources: core.Array | core.ArrayOut; } export class EncryptionConfig extends core.Schema { @core.attr(Provider) public provider!: Provider; @core.attr(String, { kind: "array" }) public resources!: core.Array | core.ArrayOut; } export interface ClusterArgs extends core.ResourceArgs { /** * (Optional) List of the desired control plane logging to enable. For more information, see [Amazon EK * S Control Plane Logging](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html). */ enabledClusterLogTypes?: core.Array | core.ArrayOut; /** * (Optional) Configuration block with encryption configuration for the cluster. Only available on Kube * rnetes 1.13 and above clusters created after March 6, 2020. Detailed below. */ encryptionConfig?: EncryptionConfig; /** * (Optional) Configuration block with kubernetes network configuration for the cluster. Detailed below * . If removed, Terraform will only perform drift detection if a configuration value is provided. */ kubernetesNetworkConfig?: KubernetesNetworkConfig; name: string | core.StringOut; /** * (Required) ARN of the IAM role that provides permissions for the Kubernetes control plane to make ca * lls to AWS API operations on your behalf. Ensure the resource configuration includes explicit depend * encies on the IAM Role permissions by adding [`depends_on`](https://www.terraform.io/docs/configurat * ion/meta-arguments/depends_on.html) if using the [`aws_iam_role_policy` resource](/docs/providers/aw * s/r/iam_role_policy.html) or [`aws_iam_role_policy_attachment` resource](/docs/providers/aws/r/iam_r * ole_policy_attachment.html), otherwise EKS cannot delete EKS managed EC2 infrastructure such as Secu * rity Groups on EKS Cluster deletion. */ roleArn: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * Map of tags assigned to the resource, including those inherited from the provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block). */ tagsAll?: core.Map | core.MapOut; version?: string | core.StringOut; /** * (Required) Configuration block for the VPC associated with your cluster. Amazon EKS VPC resources ha * ve specific requirements to work properly with Kubernetes. For more information, see [Cluster VPC Co * nsiderations](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) and [Cluster Secur * ity Group Considerations](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) in t * he Amazon EKS User Guide. Detailed below. Also contains attributes detailed in the Attributes sectio * n. */ vpcConfig: VpcConfig; } export class Cluster extends core.Resource { /** * ARN of the cluster. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * Attribute block containing `certificate-authority-data` for your cluster. Detailed below. */ @core.attr(CertificateAuthority, { computed: true, kind: "array" }) public certificateAuthority!: | core.Array | core.ArrayOut; /** * Unix epoch timestamp in seconds for when the cluster was created. */ @core.attr(String, { computed: true }) public createdAt!: string | core.StringOut; /** * (Optional) List of the desired control plane logging to enable. For more information, see [Amazon EK * S Control Plane Logging](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html). */ @core.attr(String, { kind: "array" }) public enabledClusterLogTypes?: | core.Array | core.ArrayOut; /** * (Optional) Configuration block with encryption configuration for the cluster. Only available on Kube * rnetes 1.13 and above clusters created after March 6, 2020. Detailed below. */ @core.attr(EncryptionConfig) public encryptionConfig?: EncryptionConfig; /** * Endpoint for your Kubernetes API server. */ @core.attr(String, { computed: true }) public endpoint!: string | core.StringOut; /** * Name of the cluster. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * Attribute block containing identity provider information for your cluster. Only available on Kuberne * tes version 1.13 and 1.14 clusters created or upgraded on or after September 3, 2019. Detailed below * . */ @core.attr(Identity, { computed: true, kind: "array" }) public identity!: core.Array | core.ArrayOut; /** * (Optional) Configuration block with kubernetes network configuration for the cluster. Detailed below * . If removed, Terraform will only perform drift detection if a configuration value is provided. */ @core.attr(KubernetesNetworkConfig, { computed: true }) public kubernetesNetworkConfig?: KubernetesNetworkConfig; @core.attr(String) public name!: string | core.StringOut; /** * Platform version for the cluster. */ @core.attr(String, { computed: true }) public platformVersion!: string | core.StringOut; /** * (Required) ARN of the IAM role that provides permissions for the Kubernetes control plane to make ca * lls to AWS API operations on your behalf. Ensure the resource configuration includes explicit depend * encies on the IAM Role permissions by adding [`depends_on`](https://www.terraform.io/docs/configurat * ion/meta-arguments/depends_on.html) if using the [`aws_iam_role_policy` resource](/docs/providers/aw * s/r/iam_role_policy.html) or [`aws_iam_role_policy_attachment` resource](/docs/providers/aws/r/iam_r * ole_policy_attachment.html), otherwise EKS cannot delete EKS managed EC2 infrastructure such as Secu * rity Groups on EKS Cluster deletion. */ @core.attr(String) public roleArn!: string | core.StringOut; /** * Status of the EKS cluster. One of `CREATING`, `ACTIVE`, `DELETING`, `FAILED`. */ @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * Map of tags assigned to the resource, including those inherited from the provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; @core.attr(String, { computed: true }) public version?: string | core.StringOut; /** * (Required) Configuration block for the VPC associated with your cluster. Amazon EKS VPC resources ha * ve specific requirements to work properly with Kubernetes. For more information, see [Cluster VPC Co * nsiderations](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) and [Cluster Secur * ity Group Considerations](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) in t * he Amazon EKS User Guide. Detailed below. Also contains attributes detailed in the Attributes sectio * n. */ @core.attr(VpcConfig) public vpcConfig!: VpcConfig; constructor(name: string, args?: ClusterArgs) { super(name, "aws_eks_cluster", args); } public override getNamespace(): string { return "aws_eks"; } }