karbon-platform-services
karbon-platform-services copied to clipboard
[SHLK-2608] Split Terraform config into sub-configs
Split TF config into three modules:
- karbon_cluster: Creates Karbon cluster
- karbon_kube_config: Retrieves kube config which can become stale!
- helm_chart: KPS PaaS stack as helm chart
karbon_kube_config module might have to be explicitly refreshed by targeting only this module on apply:
$ terraform apply -auto-approve -var-file yoshi.tfvars -target module.karbon_kube_config
Next the rest of the config can be either applied or destroyed:
$ terraform apply -auto-approve -var-file yoshi.tfvars
$ terraform destroy -auto-approve -var-file yoshi.tfvars
It's worth mentioning that karbon_kube_config produced kube.config which can be used by kubectl or any other Kubernetes tool.
$ terraform apply -auto-approve -var-file yoshi.tfvars -target module.karbon_kube_config
$ kubectl --kubeconfig kube.config get pod