forked from UN-SPIDER/burn-severity-mapping-EO
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use tofu output to populate local env vars, then use it to populate r…
…emote env vars
- Loading branch information
Showing
3 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
output "sftp_server_endpoint" { | ||
description = "The endpoint of the SFTP server" | ||
value = module.sftp.sftp_server_endpoint | ||
} | ||
|
||
output "sftp_admin_username" { | ||
description = "The username of the SFTP admin user" | ||
value = module.sftp.sftp_admin_username | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
cd /workspace/.deployment/tofu | ||
tofu refresh | ||
export sftp_admin_username="$(tofu output sftp_admin_username)" | ||
export sftp_server_endpoint="$(tofu output sftp_server_endpoint)" | ||
echo "# TOFU ENV VARS" >> ~/.bashrc | ||
echo "SFTP_ADMIN_USERNAME=$sftp_admin_username" >> ~/.bashrc | ||
echo "SFTP_SERVER_ENDPOINT=$sftp_server_endpoint" >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters