From 7f3a5e7a554b807c2ca87851eac409ace09ec7c9 Mon Sep 17 00:00:00 2001 From: Matheus Fidelis Date: Fri, 8 Mar 2024 14:34:32 -0300 Subject: [PATCH] fix(main): renaming eks_cluster resource to main --- DOCS.md | 6 +++--- README.md | 6 +++--- USAGE.md | 6 +++--- addons.tf | 8 ++++---- aws-auth-config.tf | 2 +- data.tf | 2 +- eks.tf | 6 +++--- helm_alb_ingress_controller.tf | 2 +- helm_argo_rollouts.tf | 6 +++--- helm_chaos_mesh.tf | 2 +- helm_cluster_autoscaler.tf | 2 +- helm_descheduler.tf | 2 +- helm_istio.tf | 16 ++++++++-------- helm_jaeger.tf | 6 +++--- helm_karpenter.tf | 10 +++++----- helm_keda.tf | 2 +- helm_kube_state_metrics.tf | 2 +- helm_managed_prometheus.tf | 4 ++-- helm_metrics_server.tf | 2 +- helm_prometheus.tf | 6 +++--- nodes.tf | 4 ++-- oidc.tf | 4 ++-- output.tf | 2 +- provider.tf | 12 ++++++------ 24 files changed, 60 insertions(+), 60 deletions(-) diff --git a/DOCS.md b/DOCS.md index 683c030..8bf77d3 100644 --- a/DOCS.md +++ b/DOCS.md @@ -31,7 +31,7 @@ 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_cluster.main](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_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 | @@ -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 | @@ -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 | diff --git a/README.md b/README.md index 65273f4..42b7bd8 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ 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_cluster.main](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_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 | @@ -103,7 +103,7 @@ No modules. | [aws_iam_role.alb_controller](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource | | [aws_iam_role.aws_node_termination_handler_role](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.grafana](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource | | [aws_iam_role.karpenter_role](https://registry.terraform.io/providers/aws/latest/docs/resources/iam_role) | resource | @@ -200,7 +200,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 | | [aws_iam_policy_document.karpenter_policy](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source | | [aws_iam_policy_document.karpenter_role](https://registry.terraform.io/providers/aws/latest/docs/data-sources/iam_policy_document) | data source | diff --git a/USAGE.md b/USAGE.md index aa91591..309455f 100644 --- a/USAGE.md +++ b/USAGE.md @@ -27,7 +27,7 @@ | [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_cluster.main](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_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 | @@ -36,7 +36,7 @@ | [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 | @@ -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 | diff --git a/addons.tf b/addons.tf index ae66eab..38940bf 100644 --- a/addons.tf +++ b/addons.tf @@ -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 @@ -12,7 +12,7 @@ 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 @@ -25,7 +25,7 @@ resource "aws_eks_addon" "coredns" { } 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 @@ -37,7 +37,7 @@ 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 diff --git a/aws-auth-config.tf b/aws-auth-config.tf index 2d84149..6a9e370 100644 --- a/aws-auth-config.tf +++ b/aws-auth-config.tf @@ -16,6 +16,6 @@ YAML } depends_on = [ - aws_eks_cluster.eks_cluster + aws_eks_cluster.main ] } diff --git a/data.tf b/data.tf index b7a58cd..c9356eb 100644 --- a/data.tf +++ b/data.tf @@ -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" {} diff --git a/eks.tf b/eks.tf index 41286c1..0c1d2a9 100644 --- a/eks.tf +++ b/eks.tf @@ -1,5 +1,5 @@ -resource "aws_eks_cluster" "eks_cluster" { +resource "aws_eks_cluster" "main" { name = var.cluster_name version = var.k8s_version @@ -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" } @@ -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" } \ No newline at end of file diff --git a/helm_alb_ingress_controller.tf b/helm_alb_ingress_controller.tf index e887ac2..43502c3 100644 --- a/helm_alb_ingress_controller.tf +++ b/helm_alb_ingress_controller.tf @@ -38,7 +38,7 @@ resource "helm_release" "alb_ingress_controller" { } depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] diff --git a/helm_argo_rollouts.tf b/helm_argo_rollouts.tf index 58e5542..60fddba 100644 --- a/helm_argo_rollouts.tf +++ b/helm_argo_rollouts.tf @@ -37,7 +37,7 @@ resource "helm_release" "argo_rollouts" { depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] @@ -63,7 +63,7 @@ spec: YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, @@ -97,7 +97,7 @@ spec: YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, diff --git a/helm_chaos_mesh.tf b/helm_chaos_mesh.tf index fc5ac53..4d34dd7 100644 --- a/helm_chaos_mesh.tf +++ b/helm_chaos_mesh.tf @@ -8,7 +8,7 @@ resource "helm_release" "chaos_mesh" { create_namespace = true depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] diff --git a/helm_cluster_autoscaler.tf b/helm_cluster_autoscaler.tf index cd5ef32..f60ba1e 100644 --- a/helm_cluster_autoscaler.tf +++ b/helm_cluster_autoscaler.tf @@ -47,7 +47,7 @@ resource "helm_release" "cluster_autoscaler" { } depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] diff --git a/helm_descheduler.tf b/helm_descheduler.tf index bbcf730..ccd75f5 100644 --- a/helm_descheduler.tf +++ b/helm_descheduler.tf @@ -14,7 +14,7 @@ resource "helm_release" "descheduler" { } depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] diff --git a/helm_istio.tf b/helm_istio.tf index f8f9f3f..d74201a 100644 --- a/helm_istio.tf +++ b/helm_istio.tf @@ -9,7 +9,7 @@ resource "helm_release" "istio_base" { version = "1.20.2" depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.alb_ingress_controller @@ -27,7 +27,7 @@ resource "helm_release" "istiod" { version = "1.20.2" depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base @@ -136,7 +136,7 @@ resource "helm_release" "istio_ingress" { } depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, @@ -161,7 +161,7 @@ YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, @@ -185,7 +185,7 @@ spec: YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, @@ -245,7 +245,7 @@ resource "helm_release" "kiali-server" { depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, @@ -273,7 +273,7 @@ spec: YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, @@ -306,7 +306,7 @@ spec: YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, diff --git a/helm_jaeger.tf b/helm_jaeger.tf index b509d5d..9cfa6b8 100644 --- a/helm_jaeger.tf +++ b/helm_jaeger.tf @@ -9,7 +9,7 @@ resource "helm_release" "jaeger" { create_namespace = true depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] @@ -35,7 +35,7 @@ spec: YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, @@ -69,7 +69,7 @@ spec: YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, diff --git a/helm_karpenter.tf b/helm_karpenter.tf index bbebaeb..c1242cc 100644 --- a/helm_karpenter.tf +++ b/helm_karpenter.tf @@ -20,7 +20,7 @@ resource "helm_release" "karpenter" { set { name = "clusterEndpoint" - value = aws_eks_cluster.eks_cluster.endpoint + value = aws_eks_cluster.main.endpoint } set { @@ -29,7 +29,7 @@ resource "helm_release" "karpenter" { } depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, kubernetes_config_map.aws-auth, aws_eks_node_group.cluster ] @@ -78,7 +78,7 @@ resource "aws_launch_template" "karpenter" { update_default_version = true vpc_security_group_ids = [ - aws_eks_cluster.eks_cluster.vpc_config[0].cluster_security_group_id + aws_eks_cluster.main.vpc_config[0].cluster_security_group_id ] user_data = base64encode(templatefile( @@ -86,8 +86,8 @@ resource "aws_launch_template" "karpenter" { { CLUSTER_NAME = var.cluster_name, CLUSTER_ID = var.cluster_name, - APISERVER_ENDPOINT = aws_eks_cluster.eks_cluster.endpoint, - B64_CLUSTER_CA = aws_eks_cluster.eks_cluster.certificate_authority.0.data + APISERVER_ENDPOINT = aws_eks_cluster.main.endpoint, + B64_CLUSTER_CA = aws_eks_cluster.main.certificate_authority.0.data } )) diff --git a/helm_keda.tf b/helm_keda.tf index 021dad7..e651010 100644 --- a/helm_keda.tf +++ b/helm_keda.tf @@ -15,7 +15,7 @@ resource "helm_release" "keda" { } depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] diff --git a/helm_kube_state_metrics.tf b/helm_kube_state_metrics.tf index 8f53488..4a6f8bd 100644 --- a/helm_kube_state_metrics.tf +++ b/helm_kube_state_metrics.tf @@ -21,7 +21,7 @@ resource "helm_release" "kube_state_metrics" { } depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] diff --git a/helm_managed_prometheus.tf b/helm_managed_prometheus.tf index 063d056..9b78255 100644 --- a/helm_managed_prometheus.tf +++ b/helm_managed_prometheus.tf @@ -66,7 +66,7 @@ # } # depends_on = [ -# aws_eks_cluster.eks_cluster, +# aws_eks_cluster.main, # aws_eks_node_group.cluster, # kubernetes_config_map.aws-auth # ] @@ -129,7 +129,7 @@ resource "helm_release" "managed_prometheus" { depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] diff --git a/helm_metrics_server.tf b/helm_metrics_server.tf index 760eb97..a900456 100644 --- a/helm_metrics_server.tf +++ b/helm_metrics_server.tf @@ -10,7 +10,7 @@ resource "helm_release" "metrics_server" { } depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] diff --git a/helm_prometheus.tf b/helm_prometheus.tf index d7a43c4..8f4ed65 100644 --- a/helm_prometheus.tf +++ b/helm_prometheus.tf @@ -22,7 +22,7 @@ resource "helm_release" "prometheus" { depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth ] @@ -52,7 +52,7 @@ spec: YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, @@ -88,7 +88,7 @@ spec: YAML depends_on = [ - aws_eks_cluster.eks_cluster, + aws_eks_cluster.main, aws_eks_node_group.cluster, kubernetes_config_map.aws-auth, helm_release.istio_base, diff --git a/nodes.tf b/nodes.tf index e7f08cd..c482c07 100644 --- a/nodes.tf +++ b/nodes.tf @@ -1,7 +1,7 @@ resource "aws_eks_node_group" "cluster" { - cluster_name = aws_eks_cluster.eks_cluster.name - node_group_name = format("%s-node-group", aws_eks_cluster.eks_cluster.name) + cluster_name = aws_eks_cluster.main.name + node_group_name = format("%s-node-group", aws_eks_cluster.main.name) node_role_arn = aws_iam_role.eks_nodes_roles.arn subnet_ids = [ diff --git a/oidc.tf b/oidc.tf index 77c09da..95ff6e5 100644 --- a/oidc.tf +++ b/oidc.tf @@ -4,9 +4,9 @@ resource "aws_iam_openid_connect_provider" "eks" { data.tls_certificate.eks.certificates[0].sha1_fingerprint, "9e99a48a9960b14926bb7f3b02e22da2b0ab7280" ] - url = flatten(concat(aws_eks_cluster.eks_cluster[*].identity[*].oidc.0.issuer, [""]))[0] + url = flatten(concat(aws_eks_cluster.main[*].identity[*].oidc.0.issuer, [""]))[0] } data "tls_certificate" "eks" { - url = aws_eks_cluster.eks_cluster.identity[0].oidc[0].issuer + url = aws_eks_cluster.main.identity[0].oidc[0].issuer } \ No newline at end of file diff --git a/output.tf b/output.tf index db3c48b..d72067c 100644 --- a/output.tf +++ b/output.tf @@ -3,5 +3,5 @@ output "istio_ingress_vpclink" { } output "cluster_name" { - value = aws_eks_cluster.eks_cluster.name + value = aws_eks_cluster.main.name } \ No newline at end of file diff --git a/provider.tf b/provider.tf index b7a6732..87b6dc5 100644 --- a/provider.tf +++ b/provider.tf @@ -33,20 +33,20 @@ provider "aws" { provider "helm" { kubernetes { - host = aws_eks_cluster.eks_cluster.endpoint - cluster_ca_certificate = base64decode(aws_eks_cluster.eks_cluster.certificate_authority.0.data) + host = aws_eks_cluster.main.endpoint + cluster_ca_certificate = base64decode(aws_eks_cluster.main.certificate_authority.0.data) token = data.aws_eks_cluster_auth.default.token } } provider "kubernetes" { - host = aws_eks_cluster.eks_cluster.endpoint - cluster_ca_certificate = base64decode(aws_eks_cluster.eks_cluster.certificate_authority.0.data) + host = aws_eks_cluster.main.endpoint + cluster_ca_certificate = base64decode(aws_eks_cluster.main.certificate_authority.0.data) token = data.aws_eks_cluster_auth.default.token } provider "kubectl" { - host = aws_eks_cluster.eks_cluster.endpoint - cluster_ca_certificate = base64decode(aws_eks_cluster.eks_cluster.certificate_authority.0.data) + host = aws_eks_cluster.main.endpoint + cluster_ca_certificate = base64decode(aws_eks_cluster.main.certificate_authority.0.data) token = data.aws_eks_cluster_auth.default.token } \ No newline at end of file