scott-the-programmer / terraform-provider-minikube

A terraform provider for minikube!
MIT License
49 stars 6 forks source link

docs: document how-to use `terragrunt` with `minikube`, `kubernetes`, and `helm` providers #136

Open caerulescens opened 5 months ago

caerulescens commented 5 months ago

terragrunt is an open source tool created by GruntWorks.io, and it's used as a wrapper to terraform where it provides features that terraform cannot provide. The goal of the documentation is to show another way to use the minikube, kubernetes, and helm providers together because it doesn't replace terraform usage; it extends terraform usage.

This is something that I would like to document for the open source community as I'm not really sure if anyone knows this is possible because I figured it out on my own using terraform-provider-minikube.

There are a lot of advantages:

generate "provider" { path = "provider.tf" if_exists = "overwrite" contents = <<EOF provider "minikube" { kubernetes_version = "${local.kubernetes_version}" } EOF }

* You can template the values with the `remote_state` block in a similar way:
```terraform
remote_state {
  backend = "local"
  generate = {
    path      = "backend.tf"
    if_exists = "overwrite"
  }
  config = {
    path = "${get_parent_terragrunt_dir()}/${path_relative_to_include()}/terraform.tfstate"
  }
}
caerulescens commented 5 months ago

@scott-the-programmer Would you assign this one to me? How do you think this information should manifest? Should it be docs only? Should it be a repository? I already have a cookiecutter template that I'm about to tag and release in the coming weeks which will provide all necessary structure and design for using terraform-provider-minikube with terragrunt.

I think it would be best to document the minimum necessary design to use terragrunt, terraform-provider-minikube, terraform-provider-helm, and terraform-provider-kubernetes together while linking to the cookiecutter template on GitHub. The cookiecutter template I've created allows for initializing a "production-ready" structure and more advanced practices that would make the example too complex for terraform-provider-minikube newcomers.

caerulescens commented 5 months ago

Maybe making two sections in the docs:

And both show kubernetes and helm usage.

scott-the-programmer commented 5 months ago

Yep, sounds good to me!

caerulescens commented 5 days ago

I haven't forgotten about this; I'm going to get to this sometime this week.