File tree Expand file tree Collapse file tree 5 files changed +37
-1
lines changed
onboarding-with-existing-aks-cluster
onboarding-with-existing-eks-cluster
onboarding-with-existing-gke-cluster Expand file tree Collapse file tree 5 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -27,4 +27,6 @@ module "castai_omni_edge_location_gcp" {
2727 cluster_id = module. castai_omni_cluster . cluster_id
2828 organization_id = module. castai_omni_cluster . organization_id
2929 region = " europe-west4"
30+
31+ depends_on = [module . castai_omni_cluster ]
3032}
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ terraform {
1818 source = " hashicorp/helm"
1919 version = " >= 2.0"
2020 }
21+ kubernetes = {
22+ source = " hashicorp/kubernetes"
23+ version = " >= 2.35.0"
24+ }
2125 }
2226}
2327
@@ -39,6 +43,13 @@ provider "helm" {
3943 }
4044}
4145
46+ provider "kubernetes" {
47+ host = data. azurerm_kubernetes_cluster . aks . kube_config [0 ]. host
48+ client_certificate = base64decode (data. azurerm_kubernetes_cluster . aks . kube_config [0 ]. client_certificate )
49+ client_key = base64decode (data. azurerm_kubernetes_cluster . aks . kube_config [0 ]. client_key )
50+ cluster_ca_certificate = base64decode (data. azurerm_kubernetes_cluster . aks . kube_config [0 ]. cluster_ca_certificate )
51+ }
52+
4253provider "castai" {
4354 api_token = var. castai_api_token
4455 api_url = var. castai_api_url
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ terraform {
1414 source = " hashicorp/helm"
1515 version = " >= 3.1.1"
1616 }
17+ kubernetes = {
18+ source = " hashicorp/kubernetes"
19+ version = " >= 2.35.0"
20+ }
1721 null = {
1822 source = " hashicorp/null"
1923 version = " >= 3.2.4"
@@ -53,6 +57,23 @@ provider "helm" {
5357 }
5458}
5559
60+ provider "kubernetes" {
61+ host = data. aws_eks_cluster . eks . endpoint
62+ cluster_ca_certificate = base64decode (data. aws_eks_cluster . eks . certificate_authority [0 ]. data )
63+ exec {
64+ api_version = " client.authentication.k8s.io/v1beta1"
65+ command = " aws"
66+ args = [
67+ " eks" ,
68+ " get-token" ,
69+ " --cluster-name" ,
70+ data . aws_eks_cluster . eks . name ,
71+ " --region" ,
72+ var . eks_cluster_region
73+ ]
74+ }
75+ }
76+
5677provider "castai" {
5778 api_token = var. castai_api_token
5879 api_url = var. castai_api_url
Original file line number Diff line number Diff line change @@ -50,4 +50,6 @@ module "castai_omni_edge_location_gcp" {
5050 cluster_id = module. castai_omni_cluster . cluster_id
5151 organization_id = module. castai_omni_cluster . organization_id
5252 region = " europe-west4"
53+
54+ depends_on = [module . castai_omni_cluster ]
5355}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ locals {
2828 }
2929 virtualKubelet = {
3030 extra = {
31- args = " --certificate-type=aws"
31+ args = [ " --certificate-type=aws" ]
3232 }
3333 }
3434 networking = {
You can’t perform that action at this time.
0 commit comments