Skip to content

Commit

Permalink
feat: set loadbalancer_hosted_zone
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach committed Feb 7, 2024
1 parent c04ba25 commit eee94af
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/base/humanitec.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ locals {
ingress_address = data.kubernetes_service.ingress_nginx_controller.status.0.load_balancer.0.ingress.0.hostname
}

data "aws_elb_hosted_zone_id" "main" {}

resource "humanitec_resource_definition" "k8s_cluster_driver" {
driver_type = "humanitec/k8s-cluster-eks"
id = var.cluster_name
Expand All @@ -12,9 +14,10 @@ resource "humanitec_resource_definition" "k8s_cluster_driver" {

driver_inputs = {
values_string = jsonencode({
"name" = module.aws_eks.cluster_name
"loadbalancer" = local.ingress_address
"region" = var.region
"name" = module.aws_eks.cluster_name
"loadbalancer" = local.ingress_address
"loadbalancer_hosted_zone" = data.aws_elb_hosted_zone_id.main.id
"region" = var.region
}),
secrets_string = jsonencode({
"credentials" = {
Expand Down

0 comments on commit eee94af

Please sign in to comment.