script fix
This commit is contained in:
parent
5133d0f102
commit
5bedea67f1
2
scipt.sh
2
scipt.sh
@ -3,7 +3,7 @@
|
|||||||
echo "Pobieranie danych AWS CLI..."
|
echo "Pobieranie danych AWS CLI..."
|
||||||
AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
|
AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
|
||||||
AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
|
AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
|
||||||
AWS_SESSION_TOKEN=$(aws sts get-session-token --duration-seconds 3600 --query 'Credentials.SessionToken' --output text)
|
AWS_SESSION_TOKEN=$(aws configure get aws_session_token)
|
||||||
DEFAULT_VPC=$(aws ec2 describe-vpcs --filters "Name=isDefault,Values=true" --query 'Vpcs[0].VpcId' --output text)
|
DEFAULT_VPC=$(aws ec2 describe-vpcs --filters "Name=isDefault,Values=true" --query 'Vpcs[0].VpcId' --output text)
|
||||||
|
|
||||||
if [[ -z "$AWS_ACCESS_KEY_ID" || -z "$AWS_SECRET_ACCESS_KEY" || -z "$AWS_SESSION_TOKEN" || -z "$DEFAULT_VPC" ]]; then
|
if [[ -z "$AWS_ACCESS_KEY_ID" || -z "$AWS_SECRET_ACCESS_KEY" || -z "$AWS_SESSION_TOKEN" || -z "$DEFAULT_VPC" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user