Skip to content

Commit

Permalink
Merge pull request #3 from humanitec-architecture/no-kubernetes-provider
Browse files Browse the repository at this point in the history
no need of the kubernetes provider
  • Loading branch information
mathieu-benoit authored Feb 2, 2024
2 parents 43b6a0e + 069e050 commit 1aa24e9
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 21 deletions.
3 changes: 0 additions & 3 deletions modules/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Module that provides the reference architecture.
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | ~> 3.87 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | ~> 2.12 |
| <a name="requirement_humanitec"></a> [humanitec](#requirement\_humanitec) | ~> 0 |
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | ~> 2.25 |

## Providers

Expand All @@ -23,7 +22,6 @@ Module that provides the reference architecture.
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | ~> 3.87 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | ~> 2.12 |
| <a name="provider_humanitec"></a> [humanitec](#provider\_humanitec) | ~> 0 |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | ~> 2.25 |

## Modules

Expand Down Expand Up @@ -52,7 +50,6 @@ Module that provides the reference architecture.
| [azuread_client_config.current](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/data-sources/client_config) | data source |
| [azuread_service_principal.aks](https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/data-sources/service_principal) | data source |
| [azurerm_subscription.main](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subscription) | data source |
| [kubernetes_service.ingress_nginx_controller](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/service) | data source |

## Inputs

Expand Down
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"
}

0 comments on commit 1aa24e9

Please sign in to comment.