question: Using basti connect CLI non-interactively
#122
-
|
Hello. I am trying to use When I run a Is there a way around this? Example: basti init --aws-region xx-xxx-x --rds-instance my-rds-id --bastion-subnet my-public-subnet-id
echo "Sleeping 2 minutes for AWS resources to propagate"
sleep 2m
basti connect --aws-region xx-xxx-x --rds-instance my-rds-id --local-port xxxx
# Run the npm command
echo "Running SQL $FILE_NAME:"In this example, after the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
I wonder if maybe it's possible using a After running the command: With a file named EDIT: No, I got this to work but it still goes into interactive mode. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @corinja! What you are experiencing is not due to the interactive mode but due to the fact that From docs:
Thank you for your question! I'll transform it to a discussion so that other people can use this solution. |
Beta Was this translation helpful? Give feedback.
-
|
Ah, a bit embarrasing for me that I failed to spot that documentation! Thanks a lot @BohdanPetryshyn , I appreciate your time. |
Beta Was this translation helpful? Give feedback.
Hi @corinja! What you are experiencing is not due to the interactive mode but due to the fact that
basti connectis by design a long-running process that listens to a port on your machine. To unblock the shell script after Basti has successfully established connection, please, use the example provided in the documentation that runs Basti in a detached mode and leverages thewait-onutility to wait for the connection.From docs:
Thank …