63 lines
2.5 KiB
TypeScript
63 lines
2.5 KiB
TypeScript
import { Construct } from 'constructs';
|
|
import type { CfnCluster } from './eks.generated';
|
|
import type * as ec2 from '../../aws-ec2';
|
|
import * as iam from '../../aws-iam';
|
|
import type * as kms from '../../aws-kms';
|
|
import type * as lambda from '../../aws-lambda';
|
|
import type { ArnComponents } from '../../core';
|
|
export interface ClusterResourceProps {
|
|
readonly resourcesVpcConfig: CfnCluster.ResourcesVpcConfigProperty;
|
|
readonly roleArn: string;
|
|
readonly encryptionConfig?: Array<CfnCluster.EncryptionConfigProperty>;
|
|
readonly kubernetesNetworkConfig?: CfnCluster.KubernetesNetworkConfigProperty;
|
|
readonly name: string;
|
|
readonly version?: string;
|
|
readonly endpointPrivateAccess: boolean;
|
|
readonly endpointPublicAccess: boolean;
|
|
readonly publicAccessCidrs?: string[];
|
|
readonly vpc: ec2.IVpc;
|
|
readonly environment?: {
|
|
[key: string]: string;
|
|
};
|
|
readonly subnets?: ec2.ISubnet[];
|
|
readonly secretsEncryptionKey?: kms.IKeyRef;
|
|
readonly onEventLayer?: lambda.ILayerVersion;
|
|
readonly clusterHandlerSecurityGroup?: ec2.ISecurityGroup;
|
|
readonly tags?: {
|
|
[key: string]: string;
|
|
};
|
|
readonly logging?: {
|
|
[key: string]: [{
|
|
[key: string]: any;
|
|
}];
|
|
};
|
|
readonly accessconfig?: CfnCluster.AccessConfigProperty;
|
|
readonly remoteNetworkConfig?: CfnCluster.RemoteNetworkConfigProperty;
|
|
readonly bootstrapSelfManagedAddons?: boolean;
|
|
}
|
|
/**
|
|
* A low-level CFN resource Amazon EKS cluster implemented through a custom
|
|
* resource.
|
|
*
|
|
* Implements EKS create/update/delete through a CloudFormation custom resource
|
|
* in order to allow us to control the IAM role which creates the cluster. This
|
|
* is required in order to be able to allow CloudFormation to interact with the
|
|
* cluster via `kubectl` to enable Kubernetes management capabilities like apply
|
|
* manifest and IAM role/user RBAC mapping.
|
|
*/
|
|
export declare class ClusterResource extends Construct {
|
|
readonly ref: string;
|
|
readonly adminRole: iam.Role;
|
|
private readonly resource;
|
|
constructor(scope: Construct, id: string, props: ClusterResourceProps);
|
|
get attrEndpoint(): string;
|
|
get attrArn(): string;
|
|
get attrCertificateAuthorityData(): string;
|
|
get attrClusterSecurityGroupId(): string;
|
|
get attrEncryptionConfigKeyArn(): string;
|
|
get attrOpenIdConnectIssuerUrl(): string;
|
|
get attrOpenIdConnectIssuer(): string;
|
|
private createAdminRole;
|
|
}
|
|
export declare function clusterArnComponents(clusterName: string): ArnComponents;
|