Skip to main content

dtctl auth init

Usage​

dtctl auth init [flags]

Description​

Authenticate dtctl with a DT Cloud API key so it can manage your resources.

You are prompted for an access key and a secret key (generate them in the DT Cloud console at https://console.dt.net.tr/keys/create). The credentials are written to your local config file (~/.config/dtctl/config.yaml) with owner-only permissions.

If dtctl is already authenticated, you are asked before the stored key is replaced; pass --force to replace it without being asked.

After initializing, run dtctl region init to select a region for CCE.

Example​

dtctl auth init
dtctl auth init --force

Flags​

OptionDescription
--force, -fReplace the stored credentials without asking for confirmation
Default: false
CommandDescription
dtctl auth logoutRemove the stored credentials
dtctl auth statusShow which account dtctl is authenticated as
dtctl auth switchSwitch to a different API key

Global Flags​

OptionDescription
--api-urlSend this command to a different API endpoint, e.g. a test environment (default "https://console.dt.net.tr/api/v1")
--config, -cSpecify a custom config file
Default: ~/.config/dtctl/config.yaml
--no-headersOmit the column headers, for scripting
Default: false
--output, -oOutput format: text, wide, vertical, json. text fits the terminal, wide never truncates, vertical prints one field per line
Default: text