Terraform managed in k8s
xunholy opened this issue · 2 comments
Details
Currently, the terraform is being applied prior to the cluster bootstrap process which creates a cluster-specific configuration for resources consumed within the cluster. Such as GCS buckets for Thanos etc.
Ideally having these resources applied within the cluster means their life-cycle management is more coupled with the application that consumes them and I can ensure no application dependencies in cloud providers gets left behind if an application is either updated or removed.
Additionally, I will have the flexibility of re-using existing kustomization to overlay the terraform variables per cluster to create cluster agnostic impressions of the resource and apply them uniquely per cluster or environ.
One viable option https://github.com/crossplane/crossplane
Successfully deployed and used crossplane to create a cloudSQL instance in GCP from within my k8s cluster hosted on RPis - This would ideally deprecate the existing infrastracture/gcp/*.tf files that are XR to the applications hosting in the cluster.