scott-the-programmer / terraform-provider-minikube

A terraform provider for minikube!
MIT License
53 stars 7 forks source link

feat: `terragrunt` example with documentation #165

Closed caerulescens closed 2 months ago

caerulescens commented 2 months ago

This pull request contains an example showing usage between terraform-provider-minikube and terragrunt.

I tested init, plan, apply, destroy for:

It all worked as expected; the commands take longer than they should because terragrunt caches the entire repository so that relative file paths work correctly, which is unavoidable iirc.


close #136

caerulescens commented 2 months ago

Before merging to main, the base_source_url and ref locals need to be changed so that they reference scott-the-programmer/terraform-provider-minikube and not caerulescens/terraform-provider-minikube. If I changed before merging, then it would break the example on this PR.

Current:

locals {
  base_source_url    = "git::git@github.com:caerulescens/terraform-provider-minikube.git//examples/guides/terragrunt/terraform_project"
  ref                = "feature/terragrunt-usage"
}

New:

locals {
  base_source_url    = "git::git@github.com:scott-the-programmer/terraform-provider-minikube.git//examples/guides/terragrunt/terraform_project"
  ref                = "main"
}
caerulescens commented 2 months ago

I need to make sure the base_source_url works without SSH

caerulescens commented 2 months ago

@scott-the-programmer I checked and made sure the https link works; I changed the git details so that when the PR merges, then terragrunt_project will point to the main branch's version of terraform_project. I wrote the essentials in the docs, and I tried to avoid any information that might become outdated; I think it's good to force people to go to terragrunt's documentation for referencing standard practices.

I think everything is good on my end; it's ready for your review now.

caerulescens commented 2 months ago

The last thing I need to remember to do is check the init, plan, apply for terragrunt_project/dev/cluster-a and terragrunt_project/dev/cluster-b after the PR merges. It's for testing that the example works after the source url change in the terraform block.

scott-the-programmer commented 2 months ago

Great work! I was able to run through and create the clusters smoothly 👍🏽 Going to merge this through and point to this guide in the main readme

scott-the-programmer commented 2 months ago

Closes https://github.com/scott-the-programmer/terraform-provider-minikube/issues/136

caerulescens commented 2 months ago

Awesome!