forked from neticdk/tf-aws-eks-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
36 lines (28 loc) · 764 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Copyright (c) 2019 Netic A/S. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
locals {
tags = {
Terraform = "true"
}
}
resource "aws_eks_cluster" "this" {
name = var.name
role_arn = aws_iam_role.this.arn
version = var.cluster_version
vpc_config {
security_group_ids = [join("", aws_security_group.this.*.id)]
subnet_ids = var.subnets
}
depends_on = [
aws_iam_role_policy_attachment.eks_cluster_AmazonEKSClusterPolicy,
aws_iam_role_policy_attachment.eks_cluster_AmazonEKSServicePolicy,
]
enabled_cluster_log_types = var.enabled_cluster_log_types
lifecycle {
prevent_destroy = true
}
}