eks-cluster 작업

This commit is contained in:
2022-12-28 23:26:21 +09:00
parent 6fab570c69
commit ee0d78b284
8 changed files with 53 additions and 17 deletions

View File

@ -0,0 +1,15 @@
resource "aws_eks_cluster" "eks-cluster" {
name = "${var.name}-eks-cluster"
role_arn = var.iam_role_arn
#enabled_cluster_log_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"]
vpc_config {
security_group_ids = var.sg_list
subnet_ids = var.subnet_list
#노드그룹 통신을 위한 설정
endpoint_private_access = true
endpoint_public_access = true
}
}

View File

@ -0,0 +1,7 @@
output "endpoint" {
value = "${aws_eks_cluster.eks-cluster.endpoint}"
}
output "kubeconfig-certificate-authority-data" {
value = "${aws_eks_cluster.eks-cluster.certificate_authority.0.data}"
}

View File

@ -0,0 +1,14 @@
variable "name" {
type = string
}
variable "iam_role_arn" {
type = string
}
variable "sg_list" {
type = list(string)
}
variable "subnet_list" {
type = list(string)
}