GalleyBytes / terraform-operator

A Kubernetes CRD to handle terraform operations
http://tf.galleybytes.com
Apache License 2.0
364 stars 47 forks source link

Added possibility to handle git branches like your/branch/name #48

Closed number21 closed 3 years ago

isaaguilar commented 3 years ago

Oh this is a good point and can apply to all terrform-operator (tfo) versions < 0.4.0. I'll update the builds asap.

_In the newer version of tfo, this is handled by making this a static variable. https://github.com/isaaguilar/terraform-operator/blob/master/pkg/controllers/terraform_controller.go#L1764-L1765_

isaaguilar commented 3 years ago

@number21 I've been looking at this and trying to figure out why it's not just a static variable. Then it dawned on me; When I first started the project, I downloaded the main terraform module, and then downloaded all the sub modules all the way down. So I used this var to know where to look in my project. Now mainModule is the ONLY module, so this should just be added to the code as a static variable.

I appreciate the PR, but I'm going to close this and update the code. I will make a quick fix and release it right now. Thank you so much for pointing out the issue with the branches. https://github.com/isaaguilar/terraform-operator/commit/0960fc49c3fb7555abec3e82193c66a9ecb34941