Skip to content

Commit

Permalink
introduce module concept for eks
Browse files Browse the repository at this point in the history
  • Loading branch information
WeRockStar committed May 14, 2024
1 parent a9f5dd1 commit fb9d3a4
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 2 deletions.
142 changes: 142 additions & 0 deletions infra/iac/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions infra/iac/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ resource "helm_release" "nginx_ingress" {
chart = "ingress-nginx"
version = "v4.10.1"

values = [file("values/nginx.yaml")]
values = [file("${path.module}/values/nginx.yaml")]
}

resource "helm_release" "argocd" {
Expand All @@ -68,7 +68,7 @@ resource "helm_release" "argocd" {
chart = "argo-cd"
version = "6.7.17"

values = [file("values/argocd.yaml")]
values = [file("${path.module}/values/argocd.yaml")]

depends_on = [helm_release.nginx_ingress]
}
6 changes: 6 additions & 0 deletions infra/iac/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module "eks" {
source = "./eks"
vpc_name = "go-workshop-vpc"
cloudflare_api_token = var.cf_api_token
zone_id = var.cf_zone_id
}
11 changes: 11 additions & 0 deletions infra/iac/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
variable "cf_zone_id" {
type = string
description = "Cloudflare Zone ID"
default = "460c65b55ec2a251ab45cf8eedac4734"
}

variable "cf_api_token" {
type = string
description = "Cloudflare API Token"
sensitive = true
}

0 comments on commit fb9d3a4

Please sign in to comment.