Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
terrakube
is available via Homebrew and as a downloadable binary from the releases page.
terrakube
is available via Chocolatey and as a downloadable binary from the releases page.
help
Help about any command
create and list jobs
login to Terrakube server
logout from Terrakube server
create, update, delete and list modules
create, update, delete and list organizations
create, update, delete and list teams
create, update, delete and list workspaces
The CLI is not compatible with Terrakube 2.X, it needs to be updated and there is an open issue for this feature
terrakube cli
is Terrakube on the command line. It brings organizations, workspaces and other Terrakube concepts to the terminal.
In this section:
terrakube cli
is Terrakube on the command line. It brings organizations, workspaces and other Terrakube concepts to the terminal.
You can find installation instructions here
When you are working with terrakube cli probably you will need some help with the supported commands and flags and you can use for that, however a better option is to use the same cli to get help using --help flag or -h shortand. The embedded help provides you more detail for each command and some examples you can use as reference
You will receive a code, open the url in a web browser and provide your account details. See below code as reference
Organizations are privately shared spaces for teams to collaborate on infrastructure.
If you don't have an organization created yet, you can create a new one.
The result for the above command should be something like this
Once you create your organization you will probably want to define the teams and permissions for the organization, so you can use the team command for that.
After having given permissions to our teams we can create a workspace.
And define some variables for the created workspace
If you want to avoid entering the organization or the workspace in each command you can use environment variables, so the previous commands would be simplified as follows.
Now that you have a workspace with all the variables defined, you can execute a job, basically a job is a remote terraform apply, plan or destroy. So if you want to run apply we can execute the following command.
After a few minutes the job will finish and you can check the result
You can use a curl command to retrieve the log result from the terminal
Usually you will want to define your infrastructure templates as code using terraform and for this you can use the modules so others can reuse them.
In order to simplify the commands when you are working with the cli, you can use shortands and alias and some environment variables. See the following sections for more details.
Use the --help flag to get the details about available shorthands and alias for each command
Run to authenticate with your account. But first you need to set some environment variables.
You can also pass this values using however is recommended to use environment variables in the case you need to authenticate several times or if you are running an automatic script.
Open your terminal and execute the following commands in order to setup your terrakube environment and get authenticated. You can get the server, path, scheme, tenant id and client id values during the
You can check the organizations you have access using
For more commands and options in organization see the full documentation for
In the previous command we are creating a new team inside our new Organization and for this case we are providing permissions to manage workspaces, modules and providers. In the name flag we are using an Azure AD Group, so all the team members are defined inside the AD group. For more details about teams and permissions you can see .
create an organization |
delete an organization |
list organizations |
update an organization |
create a team
delete a team
list teams
update a team
create a workspace
delete a workspace
list workspaces
update a workspace
create, update, delete and list variables
create a variable
delete a variable
list variables
update a variable
create a job
list jobs
create a module
delete a module
list modules
update a module