Commands
In this section, you will find:
Main commands
Command | Description |
---|---|
stk login | Log in to a StackSpot account. |
stk logout | Logs out of the StackSpot account. |
stk init | Launches and configures the stk CLI tool in your environment. |
stk --help | The --help flag shows more information about the commands and their parameters. |
stk --version | Shows the current installed version. |
stk upgrade | Updates the CLI's version. |
stk validate plugin | Validates the structure of your Plugin. |
stk publish plugin | Publish your Plugin on StackSpot. |
Content creation, queries, and using StackSpot
Command | Description |
---|---|
stk create plugin | Allows you to create new Plugins on StackSpot. |
stk apply plugin | Apply a Plugin that adds new capabilities to an application. |
stk create app | Create an application from one or more Plugins. |
stk validate app | Validates the structure of an application. |
stk list workspace | Lists all Workspaces available on your account. |
stk use workspace | Allows you to access a Workspace. |
stk exit workspace | Terminates use of a Workspace. |
stk create action | Creates an Action's structure. |
stk run action | Executes an Action. |
stk list action | Lists all Actions available in a Workspace. |
stk validate action | Validates an Action's structure. |
stk publish action | Publish an Action on StackSpot. |
stk list stack | Lists all Stacks available in a Workspace. |
stk list starter | Lists all Starters available in a Workspace. |
stk list plugin | Lists all Plugins within a Workspace. |
stk list env | Lists all environments available in a Workspace. |
stk register app | Logs information from an application to a Workspace. |
stk list app | Lists all apps registered to a Workspace. |
stk create infra | Creates a Shared Infrastructure. |
stk register infra | Logs information from a Shared Infrastructure to a Workspace. |
stk list infra | Lists the Shared Infrastructures registered to your Workspace. |
stk deploy app | Deploys your application |
stk validate infra | Validates the structure of an Infrastructure. |
stk deploy infra | Deploys your infrastructure. |
stk deploy status | Monitors the status of the current deploy running. |
stk remove plugin | Removes Plugins from your application or infrastructure manifest. |
stk configure connection-interface | Edits the required Connection Interface settings when applying an app or infra Plugin. |
All commands
stk login
The command stk login
logs in to a StackSpot account. You need to enter your StackSpot account email. From there, the command opens your browser and asks you to fill in your data and confirm access to generate a session.
Use
stk login [EMAIL]
Parameters
Options | Description | Example |
---|---|---|
EMAIL | Email used to login to StackSpot account. | stk login mystackspot-account@email.com |
stk logout
The command stk logout
logs out a logged-in StackSpot account. It inactivates the session created through the command stk login
.
Use
stk logout
stk init
The command stk init
is used to initialize and configure the STK CLI tool in your environment. The command shows a list of all available parameters. In addition, allows you to configure the proxy and disable certificates.
Users with Private VPN must configure the parameters manually.
Parameters
Confira as opções disponíveis no comando:
Options | Description | Example |
---|---|---|
-f , --force-update | Forces the Plugin catalogs to be updated before the automatic update, which occurs 24 hours after the last update. | stk init --force-update |
-o , --plugins-offline | Configures Stacks catalogs to work in offline mode by default. It is used when STK CLI users do not have permission to clone repositories from GitHub. | stk init --plugins-offline |
-k , --disable-ssl-verify | Disables verification of SSL certificates. It is used when the proxy in private VPN environments returns invalid certificates to Github. | stk init --disable-ssl-verify |
-p , --proxy <host>:<port> | Configures a proxy to make HTTP connections. | stk init --proxy proxy.mycorp:8080 |
-c , --clean | Clears previously made settings. It is used to remove default settings. | stk init --clean |
-e , --proxy-exclusions <url-proxy1>,<url-proxy-2> | Defines the list of URLs, separated by a comma, which must not connect via the configured proxy. | stk init --proxy-exclusions proxy.mycorp1.com, proxy2.mycorp.com, proxyn.mycorp.com |
stk --help
STK CLI has the option --help
to show more information about the commands and their parameters.
Write in your terminal the command you need to know more information and then add --help
.
Use
- Sintaxe
- stk init help
- stk create help
- stk list help
<stk command> --help
stk init --help
stk create --help
stk list --help
stk --version
Displays in the terminal the current version of the installed STK CLI.
Use
stk --version
Parameters
Options | Description | Example |
---|---|---|
--version , -v | Displays in the terminal the current version of the STK CLI installed on your machine. | stk --version or stk -v |
stk upgrade
The command stk upgrade
updates the STK CLI version when a new one is available.
When the command stk upgrade
is executed in the terminal, it updates the STK CLI to the latest version. If there is a new version, the following message will be displayed:
Your STK CLI version 4.0.0 is outdated. The new version 4.1.0 is available.
To upgrade run the command: 'stk upgrade'.
Use
stk upgrade
Parameters
Options | Description | Example |
---|---|---|
--force | Force the STK CLI to upgrade to a new major version | stk upgrade --force |
A new major release, also known as a release major
, brings changes from the previous release. These changes cause incompatibility between versions and make it impossible for you to go back to the previous version.
If a major
version is available, when updating, the STK CLI displays an incompatibility warning and provides the parameter --force
for you to update the version.
stk validate plugin
- Validates the structure of your Plugin;
- Remove empty folders;
- Ignores files and folders that you don't want when you finish your Plugin development.
At the end of the command execution, it displays a message with the inconsistencies and the validation result.
Use
stk validate plugin
Parameters
Options | Description | Example |
---|---|---|
-v , --verbose | Option to list the details of all analyzed, validated, and ignored items of your Plugin. | stk validate plugin --verbose |
-h , --help | Displays the command help and exits. | stk validate plugin --help |
stk publish plugin
The command stk publish
publishes your Plugin on StackSpot.
Use
stk publish plugin --studio [TEXT]
Parameters
Options | Description | Example |
---|---|---|
-s , --studio | Name of the Studio where you want to publish the Plugin. | stk publish plugin --studio my-studio-name |
-v , --verbose | Displays publishing steps in detail. | stk publish plugin --verbose |
-h , --help | Displays the command help and exits. | stk publish plugin --help |
stk apply plugin
The command stk apply plugin
applies a Plugin that adds new capabilities to an application.
Use
stk apply plugin [NAME_OR_PATH]
Parameters
Options | Description | Example |
---|---|---|
NAME_OR_PATH | Name or path of the Plugin folder that will be applied. | stk apply plugin account-name/studio-name/plugin-name-v@1.0.0 |
-s ou --skip-warning | Disables the warning displayed when the Plugin is applied outside of an application created with StackSpot. | stk apply plugin account-name/studio-name/plugin-name-v@1.0.0 --skip-warning |
-h , --help | Displays the command help and exits. | stk apply plugin --help |
--<nome-input> <valor-input> | Defines the values of the Plugin's inputs through the terminal. To enter a value for more than one input, separate each input with a space. | stk apply plugin <plugin-name> --<input-name1> <input-value1> --<input-name2> <input-value2> --<input-name3> <input-value3> |
--non-interactive | Disable the warning when a Plugin is applied out of an Application create with StackSpot. | stk apply plugin studio/stack/plugin --non-interactive In this case, if input or items (e.g. Connection Interface) are not informed, the user receives an error. No questions are asked. |
-i, --inputs-json | Action input parameter in JSON format. Add the inputs using single quotes. | stk apply plugin studio/stack/plugin --inputs-json '{"input1_name": "Input 1 value", "input2_name": "Input 2 value"}' |
-s, --skip-warning | It doesn't ask the parameter input for the user. It returns an error if a required parameter hasn't been informed. When the user adds this flag, it avoids the 'The current folder does not belong to a StackSpot. Do you still want to apply the Plugin?' question. | stk apply plugin studio/stack/plugin --skip-warning |
For the input flags (--<input-name> <input-value>
) of Connection Interfaces, the values must be informed with the prefix --connectors.CONNECTION-INTERFACE-TYPE CONNECTION-INTERFACE
.
Examples:
Connection Interface syntax via input flag
stk apply plugin <PLUGIN-NAME_OR_PATH> --connectors.<CONNECTION-INTERFACE-TYPE> <CONNECTION-INTERFACE-INSTANCE>
Input flag filled in the command example
stk apply plugin my-plugin-name --connectors.aws-rds-conn my-aws-rds-conn
stk create plugin
The stk create plugin
command allows you to create new Plugins for StackSpot.
When you execute the command in the terminal, you have to choose which type the Plugin should be and a folder is generated with the structure to create the Plugin. The user must edit the file plugin.yaml
and configure the Plugin's input parameters.
Use
stk create plugin [NAME]
Parameters
Options | Description | Example |
---|---|---|
-d , --description | Text describing the Plugin and its purpose. Write the text in quotes to use spaces in the description. | stk create plugin my-plugin --description "Plugin description" |
-v , --version | Adds the Plugin version. It is one of the requirements to publish the Plugin. | stk create plugin my-plugin --version 1.0.0 |
-ar , --add-repository | Controls whether a repository should be started. Possible values are: 's'/'n' or 'true'/'false'. | stk create plugin my-plugin --add-repository 'true' |
-t , --type | Type of Plugin that will be created. Possible values are app or infra. | stk create plugin my-plugin --type app |
-gci , --generates-connection-interface | Define the Connections Interfaces in the requires Plugins field of type app and infra. To define more than one Connection Interface, separate each one with a comma (, ). | stk create plugin my-plugin -gci 'aws-ecs-conn, aws-eks-conn' --description "Plugin description" |
-rci , --requires-connection-interfaces | Define the Connections Interfaces in the generates Plugins field of type infra. To define more than one Connection Interface, separate each one with a comma (, ). | stk create plugin my-plugin -rci 'aws-ecs-conn, aws-eks-conn' --description "Plugin description" |
-r , --remote | Git URL to set as the source of the Plugin repository. Required when NAME is not provided, in which case NAME will be set to the name of the Git repository. | stk create plugin --remote my-url-git-repository |
-h , --help | Displays the command help and exits. | stk create plugin --help |
stk create app
The stk create app
command creates an application from one or more Plugins. The application is generated with the capabilities of the Plugins used. It can be applications with business rules, infrastructure, or some specific feature.
Use
stk create app [APP_NAME] --starter [ACCOUNT/STUDIO/STACK/STARTER]
If the Workspace is active, you do not need to enter the Account. Use the format: stk create app [NOME_APP] --starter [STUDIO/STACK/STARTER]
.
Example:
stk create app my-app-name --starter my-studio/my-stack/starter-name
Parameters
Options | Description | Example |
---|---|---|
APP_NAME | Defines the name of the application. If you don't provide the name, the value of the --remote option will be the application name. | stk create app my-app-name |
-s -s, --starter , --starter account-slug/studio-slug/stack-slug/starter-slug | Defines the Starter that will apply the set of Plugins in the application. You must inform the name of the Starter and its source data such as the Account, Studio and Stack. | stk create app my-app-name --starter my-account/my-studio/my-stack/starter-name |
-r , --remote <git-url> | Defines the URL of the remote Git repository that is used as the project source. If not informed, the remote repository will not be configured and you must do the process manually. | stk create app my-app-name --remote my-git-repository-url |
-i, --inputs-json | Action input parameter in JSON format. Add the inputs using single quotes. | stk create app app-name --starter [ACCOUNT/STUDIO/STACK/STARTER] --inputs-json '{"input1_name": "Input 1 value", "input2_name": "Input 2 value"}' . |
-d , --description | Defines a description of your application and its purpose. | stk create app my-app-name --description "my app description" --starter my-studio/my-stack/starter-name |
-ci , --connection-interfaces | The parameter passes a list in JSON format. It is an object with the names of the Connections Interfaces of the Plugins connectors of type app and infra. | '{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}' |
-q, --non-interactive | It does not ask the user for input parameters, returning an error if any required parameter has not been provided. | stk create app studio/stack/plugin --non-interactive |
-h , --help | Displays the command help and exits. | stk create app --help |
Examples:
Connection Interface syntax via input flag
stk create app <APP_NAME> --starter [ACCOUNT/STUDIO/STACK/STARTER] -ci '{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}'
Input flag filled in the command example
stk create app my-app --starter my-account/my-studio/my-stack/starter-name -ci '{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}'
stk validate app
The stk validate app
command validates the structure of an application. To validate, execute the command inside the application's folder.
The command will:
- Validate the structure of your application;
- Remove empty folders;
- Ignore files and folders you don't want when you're done developing your application.
For the files skipped in the .gitignore
file, the command will not validate these files.
At the end of the command execution, it displays a message with the inconsistencies and the validation result.
Use
stk validate app
Parameters
Options | Description | Example |
---|---|---|
-v , --verbose | Option to list the details of all analyzed, validated and ignored items in your application. | stk validate app --verbose |
-h , --help | Displays the command help and exits. | stk validate app --help |
stk list workspace
The command stk list workspace
lists a table of all Workspaces available to your account. To view Workspaces, login to the STK CLI using the stk login command.
Use
stk list workspace
stk use workspace
The command stk use workspace
allows you to access a Workspace. To access the available Workspaces, login to the STK CLI via the stk login command.
Use
stk use workspace [NAME]
To change Workspace, execute the command again stk use workspace
informing the name of another Workspace you want to use.
Parameters
Options | Description | Example |
---|---|---|
NAME | Workspace name you want to access. If no name is entered, a list of available Workspaces will be displayed on the terminal for you to choose a Workspace. | stk use workspace my-workspace-slug |
-h , --help | Displays the command help and exits. | stk use workspace --help |
stk exit workspace
The command stk exit workspace
ends the active session in a Workspace. After running the command, all of the following actions will only have local scope on your machine.
Use
stk exit workspace
stk create action
The command stk create action
creates the basic structure for you to develop an Action.
When you run the command in the terminal, choose what type the Action should be. Thus, a folder is generated with the structure to create this Action. Edit the file action.yam
land configure the Action's input parameters.
Use
stk create action [NAME]
Parameters
Options | Description | Example |
---|---|---|
-d , --description | Text describing the Action and its purpose. Write the text in quotes to use spaces in the description. | stk create action my-action --description "Action description" |
-v , --version | Adds the Action version. It is one of the requirements to publish the Action. | stk create action my-action --version 1.0.0 |
-ar , --add-repository | Controls whether a repository should be started. Possible values are: 's'/'n' or 'true'/'false'. | stk create action my-action --add-repository 'true' |
-t , --type | Action type that will be created. Possible values are shell and python. | stk create action my-action --type shell |
-r , --remote | Git URL to set as the origin of the Action's repository. Required when NAME is not provided, in which case NAME will be set to the name of the Git repository. | stk create action --remote my-url-git-repository |
-rci , --requires-connection-interface | Defines the Connection Interfaces required by the Action. | stk create action my-action -rci aws-rds-conn |
-h , --help | Displays the command help and exits. | stk create action --help |
stk run action
The command stk run action
runs an Action.
To use an Action using the values set in a Workspace, first access a Workspace with the stk use workspace command.
Run the Action following the pattern stk run action [STUDIO/STACK/ACTION]
:
stk run action my-studio-name/my-stack-name/my-action-name
Use
stk run action [NAME_OR_PATH]
Parameters
Options | Description | Example |
---|---|---|
NAME | Name of a published Action. Valid values: 1. Execute an Action without using Workspace context variables: <studio-slug>/<action-name>@<action-version> . Can only be used when there is no active Workspace. 2. Execute an Action using the context variables configured for the Action on the Stack within the active Workspace. The Action version ( @stack-version ) can only be set if there is no active Workspace: <studio-slug>/<stack-slug>/<action-name>@<stack-version> . | 1. No Workspace: stk run action my-studio-name/action-name@1.0.0 2. Active Workspace: stk run action my-studio-name/my-stack-name/my-action-name |
PATH | Folder path of an Action | stk run action User/HomeDir/action-folder-name |
--<input-name> <input-value> | Defines the values of the Plugin's inputs through the terminal. To enter a value for more than one input, separate each input with a space. | stk run action action-name --input-name1 input-value1 --input-name2 input-value2 --input-name3 input-value3 |
-i , --inputs-json | Action input parameters in JSON format. | stk run action "${{ inputs.action_name }}" --inputs-json "$INPUTS" |
-e , --env | Name of the environment in which the Action will run. | stk run action my-studio-name/my-stack-name/my-action-name --env prod |
-q , --non-interactive | It does not ask the user for input parameters, returning an error if any required parameter has not been provided. | stk run action my-studio-name/my-stack-name/my-action-name --non-interactive |
-ci , --connection-interfaces | Define the Connection Interfaces in the generates Plugins field of type infra. To define more than one Connection Interface, separate each one with a comma (, ). | Active Workspace: stk run action my-studio-name/my-stack-name/my-action-name -ci 'aws-ecs-conn, aws-eks-conn' |
-h , --help | Displays the command help and exits. | stk run action --help |
For the input flags (--<input-name> <input-value>
) of Connection Interfaces, the values must be informed with the prefix --connectors.CONNECTION-INTERFACE-TYPE CONNECTION-INTERFACE
. To inform values in the JSON
format, use thhe flag -ci
or --connection-interfaces
.
Examples:
Connection Interface syntax via input flag
stk run action <ACTION-NAME> --connectors.<CONNECTION-INTERFACE-TYPE> <CONNECTION-INTERFACE-INSTANCE>
Example of the input flag filled in the command
stk run action my-action-name --connectors.aws-rds-conn rds-inputs-envs
Example to inform the Connection Interface as json
With active Workspace:
`stk run action my-studio-name/my-stack-name/my-action-name -ci '[{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]'`
stk list action
The command stk list action
displays in the terminal a list with all the Actions of a Workspace.
Before running the command you must:
- Log in to your Account with the stk login command.
- If you have an active Workspace, access a Workspace with the stk use workspace command.
Use
stk list action
Parameters
Options | Description | Example |
---|---|---|
--stack | List only the Actions of a specific Stack | stk list action --stack my-stack-name |
-h , --help | Displays the command help and exits. | stk list action --help |
stk validate action
The command stk validate action
alidates the structure of your Action. You must run the command inside the Action folder you want to validate.
For the files skipped in the .gitignore
file, the command will not validate these files.
Validation occurs by type of Action, the items validated for each type are:
All Actions
- Validates if the file
action.yaml
oraction.yml
; - Validates if the files
action.yaml
oraction.yml
are duplicated inside the Action's folder.
Python
Actions
- A path to the
script.py
.- It is validated if the
script.py
is empty. - It is validated if there is a file
script.py
. - It is validated that the inputs are of the right type (pattern with regex).
- It is validated if the
Shell
Actions
- It is validated that the inputs are of the right type (pattern with regex)
Use
stk validate action
Parameters
Options | Description | Example |
---|---|---|
-v , --verbose | Option to list the details of all analyzed and validated items of your Action. | stk validate action --verbose |
-h , --help | Displays the command help and ends the search. | stk validate action --help |
stk publish action
The command stk action
publishes your Action on StackSpot.
Use
stk publish action --studio [TEXT]
Parameters
Options | Description | Example |
---|---|---|
-s , --studio | Name of the Studio you want to publish the Action. | stk publish action --studio my-studio-name |
-v , --verbose | Displays publishing steps in detail. | stk publish action --verbose |
-h , --help | Displays the command help and exits. | stk publish action --help |
stk list stack
The command stk list stack
lists in the terminal the Workspace Stacks available for your account. To list the Stacks you must be inside a Workspace, for that, run the stk use workspace command before listing the Stacks.
Use
stk list stack
stk list starter
The command stk list starter
ists in the terminal the Starters available in a Workspace. To list the Starters you must be inside a Workspace. Execute the stk use workspace command before listing the Starters.
Use
stk list starter
Parameters
Options | Description | Example |
---|---|---|
-stu , --studio | Filters and displays the list of Starters by Studio. | stk list starter --studio studio-name |
-sta , --stack | Filters and displays the list of Starters by Stack. | stk list starter --stack stack-name |
-h , --help | Displays the command help and exits. | stk list starter --help |
stk list plugin
The stk list plugin
command lists the Plugins of a Workspace. To list the Plugins you must be inside a Workspace. To do that, execute the stk use workspace command before listing Plugins.
Use
stk list plugin
Parameters
Options | Description | Example |
---|---|---|
-stu , --studio | Filters and displays the list of Plugins by Studio | stk list plugin --studio studio-name |
-sta , --stack | Filters and displays the list of Plugins by Stack | stk list plugin --stack stack-name |
-t , --type | Plugin type will be displayed. Possible values app or infra. | stk list plugin --type app or stk list plugin --type infra |
-h , --help | Displays the command help and exits. | stk list plugin --help |
stk list env
The command stk list env
lists all available environments for your Account.
The environments must be configured on the StackSpot website.
To learn how to set up an environment, see more about Workspace.
Before running the command you must:
- Log in to your Account with the stk login command.
- If you have an active Workspace, access a Workspace with the stk use workspace command.
Use
stk list env
Parameters
Options | Description | Example |
---|---|---|
-h , --help | Displays the command help and exits. | stk list env --help |
stk register app
The command stk register app
registers an application in your Workspace.
Before running the command you must:
- Log in to your Account with the stk login command.
- If you have an active Workspace, access a Workspace with the stk use workspace command.
Use
Run the command in the application folder:
stk register app
Parameters
Options | Description | Example |
---|---|---|
-r , --remote | Defines the URL of the remote Git repository that is used to host your application. If not informed, the remote repository will not be configured and you must do the process manually. | stk register app --remote https://github.com/my-git-repository-url |
-bb , --base-branch | Name of the base branch of your application's repository. | stk register app --base-branch my-app-release-branch |
-h , --help | Displays the command help and exits. | stk register app --help |
stk list app
The command stk list app
displays in the terminal a list with all the applications registered in your Workspace.
Before running the command you must:
- Log in to your Account with the stk login command.
- If you have an active Workspace, access a Workspace with the stk use workspace command.
Use
stk list app
Parameters
Options | Description | Example |
---|---|---|
-h , --help | Displays the command help and exits. | stk list app --help |
stk create infra
The stk create infra
command creates one or more Shared Infrastructure resources from Stack's Plugins of infra type.
Use
stk create infra [INFRA_NAME] --stack [STUDIO/STACK]
Parameters
Options | Description | Example |
---|---|---|
NOME_INFRA | Defines the name of the Shared Infrastructure. If you don't provide the name, the value of the --remote option will be the Shared Infrastructure name. | stk create infra my-infra-name |
-s , --stack | The Stack that contains the list of Plugins of the infra type to be applied in your Shared Infrastructure. It should follow the pattern: <STUDIO>/<STACK> | stk create infra my-infra-name --stack my-studio/my-stack |
-r , --remote <git-url> | Defines the URL of the remote Git repository that is used as the project source. If not informed, the remote repository will not be configured and you must do the process manually. | stk create infra my-infra-name --remote my-git-repository-url |
--<nome-input> <valor-input> | Defines the values of the Plugin's inputs through the terminal. To enter a value for more than one input, separate each input with a space. If the input is already filled in the Plugin file, only the value filled in the file will be considered and the value informed via flag will be disregarded. | stk create infra infra-name --stack [STUDIO/STACK] --<input-name1> <input-value1> --<input-name2> <input-value2> . |
i , --inputs-json | Action input parameter in JSON format. | -- |
-d , --description | Defines a description of your Shared Infrastructure and its purpose. | stk create infra my-app-name --description "my infra description" |
-ci , --connection-interfaces | It lists all Plugins’ required Connection Interfaces. | stk create infra infra1287v6 -s cli-qa-studio/stack-de-teste --non-interactive --description "example" --resource "example2" -ci '{"cli-qa-studio/stack-de-teste/1287v1@0.0.2":[{"name":"my-com","type":"aws-eks-conn"}]}' --plugins "cli-qa-studio/test-stack/1287v1@0.0.2" |
-p , --plugins | It lists all Infra Plugins that can be used. | Apply only one Infra Plugin:stk create infra --plugins <STUDIO>/<STACK>/<PLUGIN>@<VERSION> Example: stk create infra infra1287v5 -s cli-qa-studio/stack-de-teste --plugins "cli-qa-studio/stack-de-teste/1287v1@0.0.2" . Apply multiple Infra Plugins: stk create infra --plugins <STUDIO>/<STACK>/<PLUGIN>@<VERSION>, STUDIO/STACK/PLUGIN@VERSION Example: stk create infra infra-x2 -s deploy-studio/new-deploy-stack --plugins "deploy-studio/new-deploy-stack/aws-rds-plugin@0.0.3,deploy-studio/new-deploy-stack/sqs-deploy@0.1.1" . |
-h , --help | Displays the command help and exits. | stk create infra --help |
Examples:
Connection Interface syntax via input flag
stk create infra <INFRA_NAME> --stack <STUDIO/STACK> -ci '{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}'
Input flag filled in the command example
stk create infra my-infra --stack my-studio/my-stack -ci '{"cli-studio/cli-stack/plugin_with_required_conn": [{"name": "eks-inputs-envs", "type": "aws-eks-conn"}]}'
Example as more Plugins
stk create infra my-infra --stack my-studio/my-stack -ci '{"cli-studio/cli-stack/container-conn-plugin@0.0.1": [{"type": "ecs-task-conn", "name": "ecs-task-conn-inputs-envs"}], "cli-studio/cli-stack/ecs-cluster-fargate-plugin@0.0.2": [{"type": "ecs-cluster-fargate-conn", "name": "ecs-cluster-fargate-conn-inputs-envs"}], "cli-studio/cli-stack/aws-vpc-pluginn@0.0.3": [{"type": "aws-vpc-conn", "name": "aws-vpc-conn-inputs-envs"}, {"type": "aws-rds-conn", "name": "rds-inputs-envs"}], "cli-studio/cli-stack/aws-secret-manager-plugin@3.0.0": [{"type": "aws-secret-manager-conn", "name": "my-secret-manager"}]}'
stk register infra
The command stk register infra
registers a Shared Infrastructure in your Workspace.
Before running the command you must:
- Log in to your Account with the stk login command.
- If you have an active Workspace, access a Workspace with the stk use workspace command.
Use
stk register infra
Parameters
Options | Description | Example |
---|---|---|
-r , --remote | Defines the URL of the remote Git repository that is used to host your Shared Infrastructure. | stk register infra --remote https://github.com/my-git-repository-url |
-bb , --base-branch | Your Shared Infrastructure repository base branch name | stk register infra --base-branch my-shared-infra-branch |
-h , --help | Displays the command help and exits. | stk register infra --help |
stk list infra
The command stk list infra
displays in the terminal a list with all the Shared Infrastructures registered in your Workspace.
Before running the command you must:
- Log in to your Account with the stk login command.
- If you have an active Workspace, access a Workspace with the stk use workspace command.
Use
stk list infra
Parameters
Options | Description | Example |
---|---|---|
-h , --help | Displays the command help and exits. | stk list infra --help |
stk deploy app
The command stk deploy app
deploys your application to your Workspace Environment.
Before running the command you must:
- Log in to your Account with the stk login command.
- If you have an active Workspace, access a Workspace with the stk use workspace command.
Use
stk deploy app
Parameters
Options | Description | Example |
---|---|---|
-e , --env | Defines the name of the Environment that will be used to deploy the application. Consult the Environments available in your Workspace through the stk list env command. | stk deploy app --env qa |
-d , --draft | Creates a draft of the IAC (infrastructure as code) file that should be generated. When using the option --draft he deploy is not executed. | stk deploy app --draft |
-v , --version | Defines the version of the deploy tag. You must use the semantic versioning pattern. Example: "1.0.0" | stk deploy app --version 1.0.0 |
--<nome-input> <valor-input> | Defines the values of the deploy inputs through the terminal. To enter a value for more than one input, separate each input with a space. In case the inputs are already defined for your deployment, only the defined values will be considered and the values informed via flag will be disregarded. | stk deploy app --<input-name1> <input-value1> --<input-name2> <input-value2> . |
-vv , --verbose | It shows more detaisl about deployment. | stk deploy app --vv |
-wut , --watch-unlimited-timeout | It watches the deployment status every 5 seconds. It does that after the deployment ends. | stk deploy app --wut |
-h , --help | Displays the command help and exits. | stk deploy app --help |
stk validate app
The command stk-validate app
validates the structure of an application. To validate an application, run the command inside the application's folder.
The command will:
- Validate the structure of your application;
- Remove empty folders;
- Ignore files and folders you don't want when you're done developing your application.
For the files skipped in the .gitignore
file, the command will not validate these files.
At the end of the command execution, it displays a message with the inconsistencies and the validation result.
Use
stk validate app
Parameters
Options | Description | Example |
---|---|---|
-v , --verbose | Option to list the details of all analyzed, validated and ignored items in your application. | stk validate app --verbose |
-h , --help | Displays the command help and exits. | stk validate app --help |
stk validate infra
The command stk-validate infra
validates the structure of an infrastructure. To validate a backend, run the command inside the backend folder.
The command will:
- Validate the structure of your infrastructure;
- Remove empty folders;
- Ignore files and folders you don't want when you're done developing your application.
For the files skipped in the .gitignore
file, the command will not validate these files.
At the end of the command execution, it displays a message with the inconsistencies and the validation result.
Use
stk validate infra
Parameters
Options | Description | Example |
---|---|---|
-v , --verbose | Option to list details of all parsed, validated, and ignored items in your infrastructure. | stk validate infra --verbose |
-h , --help | Displays the command help and exits. | stk validate infra --help |
stk deploy infra
The command stk deploy infra
deploys your infrastructure to your Workspace Environment.
Before running the command you must:
- Log in to your Account with the stk login command.
- If you have an active Workspace, access a Workspace with the stk use workspace command.
Use
stk deploy infra
Parameters
Options | Description | Example |
---|---|---|
-e , --env | Defines the name of the Environment that will be used to deploy the infrastructure. Consult the Environments available in your Workspace through the stk list env command. | stk deploy infra --env qa |
-d , --draft | Creates a draft of IAC (infrastructure as code) files that can be viewed by the user. When using the option --draft the deploy is not executed. | stk deploy infra --draft |
-v , --version | Defines the version of the deploy tag. You must use the semantic versioning pattern. Example: "1.0.0" | stk deploy infra --version 1.0.0 |
--<nome-input> <valor-input> | Defines the values of the deploy inputs through the terminal. To enter a value for more than one input, separate each input with a space. In case the inputs are already defined for your deployment, only the defined values will be considered and the values informed via flag will be disregarded. | stk deploy infra --<input-name1> <input-value1> --<input-name2> <input-value2> . |
-vv , --verbose | It shows more detaisl about deployment. | stk deploy infra --vv |
-wut , --watch-unlimited-timeout | It watches the deployment status every 5 seconds. It does that after the deployment ends. | stk deploy infra --wut |
-h , --help | Displays the command help and exits. | stk deploy infra --help |
stk deploy status
The command stk deploy status
monitors and displays the deployment status of your running application or infrastructure.
Before running the command you must:
- Log in to your Account with the stk login command.
- If you have an active Workspace, access a Workspace with the stk use workspace command.
Use
stk deploy status [APP-OR-INFRA_ID]
The deploy ID is located in the stk.yaml file of the application or infrastructure. In the spec: field in the app-id or infra-id attributes.
Parameters
Options | Description | Example |
---|---|---|
-w , --watch | Monitors and displays the deployment status in the terminal every 5 seconds during the 60-second interval. | stk deploy status 01GX4FNBBBVS53WN7N2KBCK6DM2 --watch |
-h , --help | Displays the command help and exits. | stk deploy status --help |
stk remove plugin
The command stk remove plugin
removes Plugins from the manifest automatically. It can be interactive or not.
Before running the command you must:
- Log in to your Account with the stk login command.
- Run the command inside the Plugin app or infra folder.
Use
Syntax
stk remove plugin [PLUGIN_NAME/STACK_NAME/PLUGIN_VERSION]
Example
stk remove plugin deploy-studio/new-deploy-stack/sqs-deploy@0.0.9.
- It is not mandatory to add the Plugin name in the command.
- If you do not inform the Plugin name, the CLI searches the manifest for existing Plugins and shows all available options for removal.
Parameters
Options | Description | Example |
---|---|---|
-q , --non-interactive | It doesn't ask for input parameters if you don't provide any. | stk remove plugin plugin-name/stack-name/plugin-version@1.0.9 --non-interactive |
-c , --connector | Informs the connector name of a Plugin that will be removed, if there is a name conflict. | stk remove plugin --connector aws-eks-conn |
stk configure connection-interface
The command stk configure connection-interface
makes it possible to edit the Connection Interface settings that are required when applying an app or infra Plugin.
- The required Connection Interface must already be registered.
Use
Syntax
stk configure connection-interface [OPTIONS] [CONNECTION-INTERFACE]
You can configure the Connection Interfaces that appear in the Portal list.
Example
stk configure connection-interface <connection-interface> --plugin <studio-slug>/<stack-slug>/<plugin-slug>@<version> --new-value <connection-interface-name>
Parameters
Options | Description | Example |
---|---|---|
-p, --plugin | Plugin that configures: <studio>/<stack>/<plugin>@<version> | stk configure connection-interface my-lambda-conn --plugin my-studio/my-stack/my-lambda-plugin@1.0.0 |
-nv, --new-value | Informs the name of the new Connection Interface. | stk configure connection-interface my-lambda-conn --plugin my-studio/my-stack/my-lambda-plugin@1.0.0 --new-value my-new-lambda-conn |
Was this page helpful?