#Chaining terraform commands, conditionals
1 messages · Page 1 of 1 (latest)
Thanks!
Hello thanks for helping me out.
So when I run the tool on my host system wit the same command it creates a few files like::
tree -a .
.
├── .terraform
│ └── providers
│ └── registry.terraform.io
│ └── hashicorp
│ └── local
│ └── 2.3.0
│ └── darwin_arm64
│ └── terraform-provider-local_v2.3.0_x5
├── .terraform.lock.hcl
└── main.tf
When I run the same command from dagger those files are missing
Yes everything is sandboxed in containers. You can chain commands so they inherit the container state from previous commands - just like in a Dockerfile
But by default, the host is not affected. Unless you export something, which you would typically do at the end your pipeline, to get the end result. You don't want to chain dagger commands by moving data back and forth to and from the host, that would be inefficient
Got it. But then how can I chain commands and make decisions based on their output?
In this specific case, the new terraform workspace select -or-create may unblock you 🙂 https://github.com/hashicorp/terraform/pull/31633
I was wrong actually, it's no longer true that a failing command will cause the whole pipeline to fail
Hey guys, first thank you!