eks-cluster 작업
This commit is contained in:
15
modules/eks-cluster/main.tf
Normal file
15
modules/eks-cluster/main.tf
Normal 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
|
||||
}
|
||||
}
|
7
modules/eks-cluster/outputs.tf
Normal file
7
modules/eks-cluster/outputs.tf
Normal 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}"
|
||||
}
|
14
modules/eks-cluster/valiables.tf
Normal file
14
modules/eks-cluster/valiables.tf
Normal 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)
|
||||
|
||||
}
|
Reference in New Issue
Block a user