Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no need of the kubernetes provider #3

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions modules/base/humanitec.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Humanitec resource definition to connect the cluster to Humanitec

locals {
ingress_address = data.kubernetes_service.ingress_nginx_controller.status[0].load_balancer[0].ingress[0].ip
}

resource "humanitec_resource_definition" "k8s_cluster_driver" {
driver_type = "humanitec/k8s-cluster-aks"
id = var.cluster_name
Expand All @@ -12,7 +8,7 @@ resource "humanitec_resource_definition" "k8s_cluster_driver" {

driver_inputs = {
values_string = jsonencode({
"loadbalancer" : local.ingress_address
"loadbalancer" : azurerm_public_ip.ingress.ip_address
"name" : module.azure_aks.aks_name
"resource_group" : azurerm_resource_group.main.name
"subscription_id" : var.subscription_id,
Expand All @@ -35,7 +31,7 @@ resource "humanitec_resource_definition_criteria" "k8s_cluster_driver" {
}

resource "humanitec_resource_definition" "k8s_namespace" {
driver_type = "humanitec/static"
driver_type = "humanitec/echo"
id = "default-namespace"
name = "default-namespace"
type = "k8s-namespace"
Expand Down
7 changes: 0 additions & 7 deletions modules/base/meta.tf

This file was deleted.

2 changes: 1 addition & 1 deletion modules/base/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ output "aks_server_app_id" {

output "ingress_nginx_external_ip" {
description = "External IP address for the Nginx ingress controller"
value = local.ingress_address
value = azurerm_public_ip.ingress.ip_address
}
4 changes: 0 additions & 4 deletions modules/base/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ terraform {
source = "humanitec/humanitec"
version = "~> 0"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "~> 2.25"
}
}
required_version = ">= 1.3.0"
}
Loading