terraform-tools / simple-tfswitch Goto Github PK
View Code? Open in Web Editor NEWA simpler tfswitch
License: MIT License
A simpler tfswitch
License: MIT License
Salut JB,
C'est Jimmy, j'ai vu ce repo pop dans mes notifs, et je ne sais pas si tu connaissais, mais j'utilise asdf perso, qui semble faire la meme chose que ce que tu tentes de faire, mais pour un peu tout :)
L'outil en question:
https://asdf-vm.com/
Et pour terraform (en fait tous les produits hashicorp typiquement):
https://github.com/asdf-community/asdf-hashicorp
J'espere que tu va bien dans tous les cas ;)
I would prefer it written this way to remove indentation levels
for _, element := range versions {
if !constrains.Check(element) { // Validate a version against a constraint
continue
}
tfversion := element.String()
if !lib.ValidVersionFormat(tfversion) { // check if version format is correct
printInvalidTFVersion()
os.Exit(1)
}
out, err := lib.Install(tfversion, mirrorURL)
if err != nil {
log.Printf("Error during install %v", err)
os.Exit(1)
}
return out
}
Originally posted by @Vince-Chenal in #4 (comment)
At this time, this friendly tool appears to expect to find the terraform module in the current working directory in order to select a terraform version. In some cases (esp. w.r.t. scripting), it can be beneficial to indicate a directory a given process is expected to changes it working directory to ; in the case of terraform
, that would be via the -chdir
flag.
It would be awesome if this tool supported that flag by using it as the directory to search its required version at (when provided of course, falling back to its current behaviour) ๐
If no one is against it I'll attempt a tentative implementation in the near future. ๐
Sometimes when working on simple tf code you don't want to create the terraform section + required_version.
Maybe we could just try to read a TF_VERSION env var for such cases.
what do you think ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.