Skip to content

Commit 42c14ac

Browse files
committed
use require no log instead
1 parent d033ec7 commit 42c14ac

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

packages/core/resources/ec2_connect

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ _require_nolog() {
2828

2929
_require() {
3030
_require_nolog "$@"
31+
_log "$1=$2"
3132
}
3233

3334
_ec2() {
@@ -46,17 +47,11 @@ _main() {
4647

4748
_require AWS_SSM_CLI "${AWS_SSM_CLI:-}"
4849
_require AWS_REGION "${AWS_REGION:-}"
49-
_require STREAM_URL "${STREAM_URL:-}"
50-
_require TOKEN "${TOKEN:-}"
50+
_require_nolog STREAM_URL "${STREAM_URL:-}"
51+
_require_nolog TOKEN "${TOKEN:-}"
5152
_require SESSION_ID "${SESSION_ID:-}"
5253
_require LOG_FILE_LOCATION "${LOG_FILE_LOCATION:-}"
5354

54-
# Avoid logging sensitive data
55-
_log "AWS_SSM_CLI=$AWS_SSM_CLI"
56-
_log "AWS_REGION=$AWS_REGION"
57-
_log SESSION_ID "${SESSION_ID:-}"
58-
_log "LOG_FILE_LOCATION=$LOG_FILE_LOCATION"
59-
6055
_ec2 "$AWS_SSM_CLI" "$AWS_REGION" "$STREAM_URL" "$TOKEN" "$SESSION_ID"
6156
}
6257

0 commit comments

Comments
 (0)