Update terraform.tf

Deleted manifests/argocd/namespace.yaml
This commit is contained in:
2022-09-25 13:24:44 +00:00
parent a24fe0a546
commit 67aabc4217
2 changed files with 5 additions and 31 deletions

View File

@@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: argocd

View File

@@ -5,10 +5,6 @@ terraform {
source = "linode/linode" source = "linode/linode"
version = "1.27.1" version = "1.27.1"
} }
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.7.0"
}
} }
} }
//Use the Linode Provider //Use the Linode Provider
@@ -33,30 +29,12 @@ resource "linode_lke_cluster" "foobar" {
} }
} }
provider "kubectl" { provider "kubernetes" {
config_path = "config" config_path = "config"
load_config_file = true
} }
data "kubectl_file_documents" "namespace" { resource "kubernetes_namespace" "argocd" {
content = file("./manifests/argocd/namespace.yaml") metadata {
name = "argocd"
} }
data "kubectl_file_documents" "argocd" {
content = file("./manifests/argocd/install.yaml")
}
resource "kubectl_manifest" "namespace" {
count = length(data.kubectl_file_documents.namespace.documents)
yaml_body = element(data.kubectl_file_documents.namespace.documents, count.index)
override_namespace = "argocd"
}
resource "kubectl_manifest" "argocd" {
depends_on = [
kubectl_manifest.namespace,
]
count = length(data.kubectl_file_documents.argocd.documents)
yaml_body = element(data.kubectl_file_documents.argocd.documents, count.index)
override_namespace = "argocd"
} }