I want to build a container and then list the files in the container.
(see screenshot in red)
I tried doing this as 2 methods and then chaining them in the interactive shell,
1 - build container and return a Container instance
2- have a Container input arg, call container.with_exec([ ** llist files **])
workspace . | build-env https://github.com/westonplatter/terraform-mysql-admin.git | list-files-in-container However, the shell errored out with,
! no function "list-files-in-container" in type "Container"
(see screenshot in yellow)
I also tried passing the container within the same function and was able to print out the files, workspace . | build-env-and-list-files https://github.com/westonplatter/terraform-mysql-admin.git.
Is it possible to pass a container from a module's function1 to function2 and read from the container file system in function 2 ? Essentially,
function1 | function2
Full code here, https://gist.github.com/westonplatter/2df32c9522045bb958f5b4ea45cd155a