Adding a lot of stuff.
This commit is contained in:
3
modules/eks-cert-manager/data.tf
Normal file
3
modules/eks-cert-manager/data.tf
Normal file
@ -0,0 +1,3 @@
|
||||
data "aws_eks_cluster_auth" "self" {
|
||||
name = var.cluster_id
|
||||
}
|
13
modules/eks-cert-manager/main.tf
Normal file
13
modules/eks-cert-manager/main.tf
Normal file
@ -0,0 +1,13 @@
|
||||
resource "helm_release" "cert_manager" {
|
||||
name = "cert-manager"
|
||||
repository = "https://charts.jetstack.io"
|
||||
chart = "cert-manager"
|
||||
version = "1.8.0"
|
||||
namespace = var.namespace
|
||||
create_namespace = var.create_namespace
|
||||
|
||||
set {
|
||||
name = "installCRDs"
|
||||
value = true
|
||||
}
|
||||
}
|
7
modules/eks-cert-manager/provider.tf
Normal file
7
modules/eks-cert-manager/provider.tf
Normal file
@ -0,0 +1,7 @@
|
||||
provider "helm" {
|
||||
kubernetes {
|
||||
host = var.cluster_endpoint
|
||||
cluster_ca_certificate = base64decode(var.cluster_certificate_authority_data)
|
||||
token = data.aws_eks_cluster_auth.self.token
|
||||
}
|
||||
}
|
24
modules/eks-cert-manager/variables.tf
Normal file
24
modules/eks-cert-manager/variables.tf
Normal file
@ -0,0 +1,24 @@
|
||||
variable "cluster_id" {
|
||||
type = string
|
||||
description = "The name/id of the EKS cluster. Will block on cluster creation until the cluster is really ready"
|
||||
}
|
||||
|
||||
variable "cluster_endpoint" {
|
||||
type = string
|
||||
description = "Endpoint for your Kubernetes API server"
|
||||
}
|
||||
|
||||
variable "cluster_certificate_authority_data" {
|
||||
type = string
|
||||
description = "Base64 encoded certificate data required to communicate with the cluster"
|
||||
}
|
||||
|
||||
variable "namespace" {
|
||||
type = string
|
||||
description = "The namespace where cert-manager is deployed"
|
||||
}
|
||||
|
||||
variable "create_namespace" {
|
||||
type = bool
|
||||
description = "Flag allowing to create the namespace if it does not exists"
|
||||
}
|
12
modules/eks-cert-manager/versions.tf
Normal file
12
modules/eks-cert-manager/versions.tf
Normal file
@ -0,0 +1,12 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
helm = {
|
||||
source = "hashicorp/helm"
|
||||
version = "2.4.1"
|
||||
}
|
||||
aws = {
|
||||
source = "hashicorp/aws"
|
||||
version = "~> 4.4.0"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user