Files
yandexcloud-k3s/terraform/scripts/env
T

16 lines
341 B
Bash

#!/usr/bin/env bash
# source me
export YC_CLOUD_ID=$(yc config get cloud-id)
export YC_FOLDER_ID=$(yc config get folder-id)
export YC_TOKEN=$(yc iam create-token)
export TF_VAR_folder_id=$YC_FOLDER_ID
export TF_VAR_cloud_id=$YC_CLOUD_ID
if [ -f ./.env ]; then
export $(grep -v '^#' ./.env | xargs)
else
echo ".env file not found!"
fi