Switch active folder

Set default folder-id for the active profile; verify with config list

yc config set folder-id <id> && yc config list

tool
yc32 commands
tags
yccloudiam

More yc commands

  • yc config profile create prod && yc config profile activate prod

    Isolate creds per env; use yc --profile prod or YC_PROFILE in CI

  • export YC_TOKEN=$(yc iam create-token)

    OAuth->IAM token, ~12h TTL; feed to API/Terraform via YC_TOKEN env

  • yc iam service-account create --name sa-ci --description 'CI deployer'

    Create SA for pipelines; bind least-privilege roles separately

  • yc iam key create --service-account-name sa-ci --output key.json

    Authorized key JSON for non-interactive auth; note: rotate & vault it

  • yc resource-manager folder add-access-binding <id> --role editor --service-account-name sa-ci

    Scope-bind a role at folder level; prefer narrow roles over editor

all 32 yc commands