Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(main): renaming eks_cluster resource to main #30

Merged
merged 3 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ No modules.
| [aws_eks_addon.coredns](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_addon.csi_driver](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_addon.kubeproxy](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_cluster.eks_cluster](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_cluster) | resource |
| [aws_eks_node_group.cluster](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_node_group) | resource |
| [aws_eks_cluster.main](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_cluster) | resource |
| [aws_eks_node_group.main](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_node_group) | resource |
| [aws_iam_openid_connect_provider.eks](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_openid_connect_provider) | resource |
| [aws_iam_policy.aws_load_balancer_controller_policy](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_policy.cluster_autoscaler_policy](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_policy) | resource |
Expand All @@ -42,7 +42,7 @@ No modules.
| [aws_iam_policy_attachment.csi_driver](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_policy_attachment) | resource |
| [aws_iam_role.alb_controller](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.cluster_autoscaler_role](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.eks_cluster_role](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.main_role](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.eks_nodes_roles](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy_attachment.cloudwatch](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.cni](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
Expand Down Expand Up @@ -112,7 +112,7 @@ No modules.
| [aws_iam_policy_document.cluster_autoscaler_policy](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.cluster_autoscaler_role](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.csi_driver](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.eks_cluster_role](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.main_role](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.eks_nodes_role](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [tls_certificate.eks](https://registry.terraform.io/providers/tls/latest/docs/data-sources/certificate) | data source |

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ No modules.
| [aws_eks_addon.coredns](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_addon.csi_driver](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_addon.kubeproxy](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_cluster.eks_cluster](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_cluster) | resource |
| [aws_eks_node_group.cluster](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_node_group) | resource |
| [aws_eks_cluster.main](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_cluster) | resource |
| [aws_eks_node_group.main](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_node_group) | resource |
| [aws_grafana_workspace.grafana](https://registry.terraform.io/providers/aws/latest/docs/resources/grafana_workspace) | resource |
| [aws_iam_instance_profile.nodes](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_instance_profile) | resource |
| [aws_iam_openid_connect_provider.eks](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_openid_connect_provider) | resource |
Expand Down
8 changes: 4 additions & 4 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
| [aws_eks_addon.cni](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_addon.coredns](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_addon.kubeproxy](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_cluster.eks_cluster](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_cluster) | resource |
| [aws_eks_node_group.cluster](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_node_group) | resource |
| [aws_eks_cluster.main](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_cluster) | resource |
| [aws_eks_node_group.main](https://registry.terraform.io/providers/aws/latest/docs/resources/eks_node_group) | resource |
| [aws_iam_openid_connect_provider.eks](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_openid_connect_provider) | resource |
| [aws_iam_policy.aws_load_balancer_controller_policy](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_policy.cluster_autoscaler_policy](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_policy_attachment.aws_load_balancer_controller_policy](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_policy_attachment) | resource |
| [aws_iam_policy_attachment.cluster_autoscaler](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_policy_attachment) | resource |
| [aws_iam_role.alb_controller](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.cluster_autoscaler_role](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.eks_cluster_role](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.main_role](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.eks_nodes_roles](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy_attachment.cloudwatch](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.cni](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
Expand Down Expand Up @@ -105,7 +105,7 @@
| [aws_iam_policy_document.aws_load_balancer_controller_policy](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.cluster_autoscaler_policy](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.cluster_autoscaler_role](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.eks_cluster_role](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.main_role](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.eks_nodes_role](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [tls_certificate.eks](https://registry.terraform.io/providers/tls/latest/docs/data-sources/certificate) | data source |

Expand Down
12 changes: 6 additions & 6 deletions addons.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_eks_addon" "cni" {
cluster_name = aws_eks_cluster.eks_cluster.name
cluster_name = aws_eks_cluster.main.name
addon_name = "vpc-cni"

addon_version = var.addon_cni_version
Expand All @@ -12,20 +12,20 @@ resource "aws_eks_addon" "cni" {
}

resource "aws_eks_addon" "coredns" {
cluster_name = aws_eks_cluster.eks_cluster.name
cluster_name = aws_eks_cluster.main.name
addon_name = "coredns"

addon_version = var.addon_coredns_version
resolve_conflicts = "OVERWRITE"

depends_on = [
aws_eks_node_group.cluster,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth
]
}

resource "aws_eks_addon" "kubeproxy" {
cluster_name = aws_eks_cluster.eks_cluster.name
cluster_name = aws_eks_cluster.main.name
addon_name = "kube-proxy"

addon_version = var.addon_kubeproxy_version
Expand All @@ -37,14 +37,14 @@ resource "aws_eks_addon" "kubeproxy" {
}

resource "aws_eks_addon" "csi_driver" {
cluster_name = aws_eks_cluster.eks_cluster.name
cluster_name = aws_eks_cluster.main.name
addon_name = "aws-ebs-csi-driver"

addon_version = var.addon_csi_version
resolve_conflicts = "OVERWRITE"

depends_on = [
aws_eks_node_group.cluster,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth
]

Expand Down
2 changes: 1 addition & 1 deletion aws-auth-config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ YAML
}

depends_on = [
aws_eks_cluster.eks_cluster
aws_eks_cluster.main
]
}
2 changes: 1 addition & 1 deletion data.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data "aws_eks_cluster_auth" "default" {
name = aws_eks_cluster.eks_cluster.id
name = aws_eks_cluster.main.id
}

data "aws_caller_identity" "current" {}
Expand Down
6 changes: 3 additions & 3 deletions eks.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

resource "aws_eks_cluster" "eks_cluster" {
resource "aws_eks_cluster" "main" {

name = var.cluster_name
version = var.k8s_version
Expand Down Expand Up @@ -74,7 +74,7 @@ resource "aws_security_group_rule" "nodeport_cluster" {
description = "nodeport"
protocol = "tcp"

security_group_id = aws_eks_cluster.eks_cluster.vpc_config[0].cluster_security_group_id
security_group_id = aws_eks_cluster.main.vpc_config[0].cluster_security_group_id
type = "ingress"
}

Expand All @@ -85,6 +85,6 @@ resource "aws_security_group_rule" "nodeport_cluster_udp" {
description = "nodeport"
protocol = "udp"

security_group_id = aws_eks_cluster.eks_cluster.vpc_config[0].cluster_security_group_id
security_group_id = aws_eks_cluster.main.vpc_config[0].cluster_security_group_id
type = "ingress"
}
4 changes: 2 additions & 2 deletions helm_alb_ingress_controller.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ resource "helm_release" "alb_ingress_controller" {
}

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth
]
}
12 changes: 6 additions & 6 deletions helm_argo_rollouts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ resource "helm_release" "argo_rollouts" {


depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth
]
}
Expand All @@ -63,8 +63,8 @@ spec:
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
Expand Down Expand Up @@ -97,8 +97,8 @@ spec:
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod,
Expand Down
4 changes: 2 additions & 2 deletions helm_chaos_mesh.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ resource "helm_release" "chaos_mesh" {
create_namespace = true

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth
]
}
6 changes: 3 additions & 3 deletions helm_cluster_autoscaler.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resource "helm_release" "cluster_autoscaler" {

set {
name = "autoscalingGroups[0].name"
value = aws_eks_node_group.cluster.resources[0].autoscaling_groups[0].name
value = aws_eks_node_group.main.resources[0].autoscaling_groups[0].name
}

set {
Expand All @@ -47,8 +47,8 @@ resource "helm_release" "cluster_autoscaler" {
}

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth
]
}
4 changes: 2 additions & 2 deletions helm_descheduler.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ resource "helm_release" "descheduler" {
}

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth
]
}
32 changes: 16 additions & 16 deletions helm_istio.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ resource "helm_release" "istio_base" {
version = "1.20.2"

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.alb_ingress_controller
]
Expand All @@ -27,8 +27,8 @@ resource "helm_release" "istiod" {
version = "1.20.2"

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base
]
Expand Down Expand Up @@ -136,8 +136,8 @@ resource "helm_release" "istio_ingress" {
}

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
Expand All @@ -161,8 +161,8 @@ YAML


depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
Expand All @@ -185,8 +185,8 @@ spec:
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
Expand Down Expand Up @@ -245,8 +245,8 @@ resource "helm_release" "kiali-server" {


depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
Expand All @@ -273,8 +273,8 @@ spec:
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
Expand Down Expand Up @@ -306,8 +306,8 @@ spec:
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
Expand Down
12 changes: 6 additions & 6 deletions helm_jaeger.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ resource "helm_release" "jaeger" {
create_namespace = true

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth
]
}
Expand All @@ -35,8 +35,8 @@ spec:
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod,
Expand Down Expand Up @@ -69,8 +69,8 @@ spec:
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
aws_eks_cluster.main,
aws_eks_node_group.main,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod,
Expand Down
Loading