#Chaining terraform commands, conditionals

1 messages · Page 1 of 1 (latest)

drifting hollow
rare jetty
#

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

drifting hollow
#

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

rare jetty
#

Got it. But then how can I chain commands and make decisions based on their output?

opaque harness
drifting hollow
#

I was wrong actually, it's no longer true that a failing command will cause the whole pipeline to fail

rare jetty
#

Hey guys, first thank you!