terrasnek
terrasnek copied to clipboard
Properly handle the well-known tfe.v2 backslash if not present.
OTF (a TFC open source clone) well-known/terraform.json file tfe.v2 entries differs a bit from TFC. i.e. OTF: "tfe.v2":"/api/v2" TFC: "tfe.v2":"/api/v2/" This is explained here https://github.com/leg100/otf/issues/474 This change handles this scenario as well as making the code more resilient in case TFC decides to remove the ending slash at some future time. Also note the code is properly handling the ending slash in the previous line.