Skip to content

Commit

Permalink
Moved kubernetes/helm stuff to another module because they cause issu…
Browse files Browse the repository at this point in the history
…es with updates.
  • Loading branch information
zawac002 committed Sep 26, 2023
1 parent 1097976 commit 00e2c5c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 242 deletions.
78 changes: 0 additions & 78 deletions cluster_autoscaler.tf

This file was deleted.

45 changes: 0 additions & 45 deletions copy_images.tf

This file was deleted.

55 changes: 0 additions & 55 deletions eks_console_access.tf

This file was deleted.

32 changes: 0 additions & 32 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
data "aws_eks_cluster" "eks" {
depends_on = [
module.cluster.eks_managed_node_groups,
]

name = module.cluster.cluster_name
}

provider "kubernetes" {
host = data.aws_eks_cluster.eks.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.eks.certificate_authority[0].data)

exec {
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
args = ["eks", "get-token", "--cluster-name", module.cluster.cluster_name, "--region", var.region]
}
}

provider "helm" {
kubernetes {
host = data.aws_eks_cluster.eks.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.eks.certificate_authority[0].data)

exec {
api_version = "client.authentication.k8s.io/v1beta1"
command = "aws"
args = ["eks", "get-token", "--cluster-name", module.cluster.cluster_name, "--region", var.region]
}
}
}

data "aws_vpc" "eks_vpc" {
filter {
name = "tag:Name"
Expand Down
20 changes: 0 additions & 20 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -287,23 +287,3 @@ output "self_managed_node_groups_autoscaling_group_names" {
# Additional
################################################################################

output "kubectl_image_full_path" {
description = "The full URI to access the kubectl image including the registry/repository:tag"
value = module.images.images[local.kubectl_key].dest_full_path
}

output "kubectl_image_registry" {
description = "The registry portion of the URI to access the kubectl image"
value = module.images.images[local.kubectl_key].dest_registry
}

output "kubectl_image_repository" {
description = "The repository portion of the URI to access the kubectl image"
value = module.images.images[local.kubectl_key].dest_repository
}

output "kubectl_image_tag" {
description = "The tag portion of the URI to access the kubectl image"
value = module.images.images[local.kubectl_key].tag
}

12 changes: 0 additions & 12 deletions requirements.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,10 @@ terraform {
source = "hashicorp/cloudinit"
version = ">= 2.3.2"
}
helm = {
source = "hashicorp/helm"
version = ">= 2.11.0"
}
http = {
source = "hashicorp/http"
version = ">= 3.4.0"
}
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.14.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.23.0"
}
null = {
source = "hashicorp/null"
version = ">= 3.2.1"
Expand Down

0 comments on commit 00e2c5c

Please sign in to comment.