-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
122 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
output "eks" { | ||
value = module.eks.cluster | ||
description = "The generated AWS EKS cluster" | ||
value = module.eks.cluster | ||
} | ||
|
||
output "kubeconfig" { | ||
value = module.eks.kubeconfig | ||
description = "Bash script to update the kubeconfig file for the EKS cluster" | ||
value = module.eks.kubeconfig | ||
} | ||
|
||
output "kubecli" { | ||
value = module.irsa.kubecli | ||
description = "The kubectl command to attach annotations of IAM role for service account" | ||
value = module.irsa.kubecli | ||
} | ||
|
||
output "features" { | ||
value = module.eks.features | ||
description = "Features configurations of the AWS EKS cluster" | ||
value = module.eks.features | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
aws_region = "ap-northeast-2" | ||
name = "eks-tc5" | ||
tags = { | ||
env = "dev" | ||
test = "tc5" | ||
} | ||
kubernetes_version = "1.17" | ||
managed_node_groups = { | ||
default = { | ||
min_size = 1 | ||
max_size = 3 | ||
desired_size = 1 | ||
instance_type = "t3.large" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,60 @@ | ||
# output variables | ||
|
||
output "name" { | ||
value = local.name | ||
description = "The EKS cluster name" | ||
} | ||
|
||
output "features" { | ||
value = { | ||
"app_mesh_enabled" = local.app_mesh_enabled | ||
"container_insights_enabled" = local.container_insights_enabled | ||
"node_groups_enabled" = local.node_groups_enabled | ||
} | ||
description = "Features configurations for the EKS " | ||
value = local.name | ||
} | ||
|
||
output "cluster" { | ||
value = aws_eks_cluster.cp | ||
description = "The EKS cluster attributes" | ||
value = aws_eks_cluster.cp | ||
} | ||
|
||
output "role" { | ||
description = "The generated role of the EKS node group" | ||
value = (local.node_groups_enabled ? zipmap( | ||
["name", "arn"], | ||
[aws_iam_role.ng.0.name, aws_iam_role.ng.0.arn] | ||
) : null) | ||
description = "The generated role of the EKS node group" | ||
} | ||
|
||
output "oidc" { | ||
description = "The OIDC provider attributes for IAM Role for ServiceAccount" | ||
value = zipmap( | ||
["url", "arn"], | ||
[local.oidc["url"], local.oidc["arn"]] | ||
) | ||
description = "The OIDC provider attributes for IAM Role for ServiceAccount" | ||
} | ||
|
||
output "tags" { | ||
description = "The generated tags for EKS integration" | ||
value = { | ||
"shared" = local.eks-shared-tag | ||
"owned" = local.eks-owned-tag | ||
"elb" = local.eks-elb-tag | ||
"internal-elb" = local.eks-internal-elb-tag | ||
} | ||
description = "The generated tags for EKS integration" | ||
} | ||
|
||
data "aws_region" "current" {} | ||
|
||
output "kubeconfig" { | ||
description = "Bash script to update kubeconfig file" | ||
value = join(" ", [ | ||
"bash -e", | ||
format("%s/script/update-kubeconfig.sh", path.module), | ||
format("-r %s", data.aws_region.current.name), | ||
format("-n %s", aws_eks_cluster.cp.name), | ||
"-k kubeconfig", | ||
]) | ||
description = "Bash script to update kubeconfig file" | ||
} | ||
|
||
output "features" { | ||
description = "Features configurations for the EKS " | ||
value = { | ||
"app_mesh_enabled" = local.app_mesh_enabled | ||
"container_insights_enabled" = local.container_insights_enabled | ||
"managed_node_groups_enabled" = local.managed_node_groups_enabled | ||
"node_groups_enabled" = local.node_groups_enabled | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters