@@ -156,12 +156,17 @@ Resources:
156156 GroupDescription : EKS worker to EFS sg
157157 VpcId : " {{.Cluster.ConfigItems.vpc_id}}"
158158 Type : ' AWS::EC2::SecurityGroup'
159+ {{- if eq .Cluster.ConfigItems.eks_control_plane_logging "true" }}
160+ ControlPlaneLogGroup :
161+ Type : AWS::Logs::LogGroup
162+ Properties :
163+ LogGroupName : " /aws/eks/{{.Cluster.Name}}/cluster"
164+ RetentionInDays : 545
165+ {{- end }}
159166 EKSCluster :
160167 Type : AWS::EKS::Cluster
161168{{- if eq .Cluster.ConfigItems.eks_control_plane_logging "true" }}
162- {{- if eq .Cluster.ConfigItems.eks_control_plane_logging_migration "true" }}
163169 DependsOn : ControlPlaneLogGroup
164- {{- end }}
165170{{- end }}
166171 Properties :
167172 Name : " {{.Cluster.Name}}"
@@ -2306,8 +2311,8 @@ Resources:
23062311 Version : 2012-10-17
23072312 PolicyName : root
23082313 RoleName : " {{.Cluster.LocalID}}-etcd-backup"
2309- {{- end }}
23102314 Type : ' AWS::IAM::Role'
2315+ {{- end }}
23112316 StaticEgressControllerIAMRole :
23122317 Properties :
23132318 AssumeRolePolicyDocument : !Sub
@@ -3003,16 +3008,6 @@ Resources:
30033008 - BucketArn : !GetAtt AuditTrailBucket.Arn
30043009{{- end }}
30053010
3006- {{- if eq .Cluster.ConfigItems.eks_control_plane_logging "true" }}
3007- {{- if eq .Cluster.ConfigItems.eks_control_plane_logging_migration "true" }}
3008- ControlPlaneLogGroup :
3009- Type : AWS::Logs::LogGroup
3010- Properties :
3011- LogGroupName : " /aws/eks/{{.Cluster.LocalID}}/cluster"
3012- RetentionInDays : 545
3013- {{- end }}
3014- {{- end }}
3015-
30163011{{- if index .Cluster.ConfigItems "session_manager_destination_arn" }}
30173012 SessionManagerLogGroup :
30183013 Type : AWS::Logs::LogGroup
0 commit comments