Terraform Workspaces vs Folders
Вставка
- Опубліковано 3 гру 2024
- A lot of questions around terraform workspaces vs folders for folder separation. Workspaces along with using separate folders allow you to easily separate your deployments across different environments.
This video goes over a simple overview on how to use modules with folder separation to still keep maintainable code deployed across different environments.
ABOUT OUR CHANNEL: My channel covers various topics about networking, automation and cloud technologies . We cover lots of cool stuff such as cisco, terraform, aws, firewalls, security and more
Check out my channel here: / @letmetechyou
Don’t forget to subscribe!
FIND MY BLOG ATletmetechyou.com
GET IN TOUCHContact us at info @ letmetechyou.com for questions and video ideas.
when i run init in a workspace subfolder, it does not create a state file locally. I do have a couple of additional workspaces but default is selected. wondering if i need to remove my "additional" workspaces leaving only default to get it to create a state file in the directory I am running the command? I do not want to make the wrong move again and blow up the code :). hopefully what I am asking is clear. I am not using modules at this point but looking to isolate environments by directory
when using workspaces locally, assuming you're not using remote state terraform will create the state locally for each workspace in a separate folder .\terraform.tfstate.d\. You should find the state in there.