File tree 4 files changed +16
-1
lines changed
packages/@aws-cdk/aws-eks
4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export interface ClusterResourceProps {
28
28
readonly secretsEncryptionKey ?: kms . IKey ;
29
29
readonly onEventLayer ?: lambda . ILayerVersion ;
30
30
readonly clusterHandlerSecurityGroup ?: ec2 . ISecurityGroup ;
31
+ readonly tags ?: { [ key : string ] : string } ;
31
32
}
32
33
33
34
/**
@@ -89,6 +90,7 @@ export class ClusterResource extends CoreConstruct {
89
90
endpointPrivateAccess : props . endpointPrivateAccess ,
90
91
publicAccessCidrs : props . publicAccessCidrs ,
91
92
} ,
93
+ tags : props . tags ,
92
94
} ,
93
95
AssumeRoleArn : this . adminRole . roleArn ,
94
96
Original file line number Diff line number Diff line change @@ -744,13 +744,19 @@ export interface ClusterProps extends ClusterOptions {
744
744
*/
745
745
readonly defaultCapacityType ?: DefaultCapacityType ;
746
746
747
-
748
747
/**
749
748
* The IAM role to pass to the Kubectl Lambda Handler.
750
749
*
751
750
* @default - Default Lambda IAM Execution Role
752
751
*/
753
752
readonly kubectlLambdaRole ?: iam . IRole ;
753
+
754
+ /**
755
+ * The tags assigned to the EKS cluster
756
+ *
757
+ * @default - none
758
+ */
759
+ readonly tags ?: { [ key : string ] : string } ;
754
760
}
755
761
756
762
/**
@@ -1372,6 +1378,7 @@ export class Cluster extends ClusterBase {
1372
1378
subnets : placeClusterHandlerInVpc ? privateSubnets : undefined ,
1373
1379
clusterHandlerSecurityGroup : this . clusterHandlerSecurityGroup ,
1374
1380
onEventLayer : this . onEventLayer ,
1381
+ tags : props . tags ,
1375
1382
} ) ;
1376
1383
1377
1384
if ( this . endpointAccess . _config . privateAccess && privateSubnets . length !== 0 ) {
Original file line number Diff line number Diff line change 951
951
],
952
952
"endpointPublicAccess" : true ,
953
953
"endpointPrivateAccess" : true
954
+ },
955
+ "tags" : {
956
+ "foo" : " bar"
954
957
}
955
958
},
956
959
"AssumeRoleArn" : {
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ class EksClusterStack extends TestStack {
38
38
defaultCapacity : 2 ,
39
39
version : eks . KubernetesVersion . V1_21 ,
40
40
secretsEncryptionKey,
41
+ tags : {
42
+ foo : 'bar' ,
43
+ } ,
41
44
} ) ;
42
45
43
46
this . assertFargateProfile ( ) ;
You can’t perform that action at this time.
0 commit comments