> For the complete documentation index, see [llms.txt](https://docs.terrakube.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terrakube.io/2.33.0/user-guide/terrakube-cli/commands/job/create.md).

# create

Triggers a new execution job on a workspace (e.g. `plan`, `apply`, `destroy`).

## Usage

```bash
terrakube job create --organization <ORG_NAME_OR_ID> --workspace <WORKSPACE_NAME_OR_ID> --command <COMMAND> [flags]
```

## Flags

| Flag                | Short | Type        | Required | Description                                      |
| ------------------- | ----- | ----------- | -------- | ------------------------------------------------ |
| `--organization`    | `-o`  | String      | Yes      | Name or ID of the parent organization.           |
| `--workspace`       | `-w`  | String      | Yes      | Name or ID of the target workspace.              |
| `--command`         | `-c`  | String      | Yes      | Command to execute (`plan`, `apply`, `destroy`). |
| `--commit-id`       |       | String      | No       | VCS commit SHA/ID.                               |
| `--override-branch` |       | String      | No       | Override git branch.                             |
| `--override-source` |       | String      | No       | Override git source repository URL.              |
| `--plan-changes`    |       | Bool        | No       | Flag indicating if plan contains changes.        |
| `--refresh`         |       | Bool        | No       | Refresh state during execution.                  |
| `--refresh-only`    |       | Bool        | No       | Refresh state only mode.                         |
| `--target-addrs`    |       | StringSlice | No       | Target specific resource addresses.              |
| `--replace-addrs`   |       | StringSlice | No       | Replace specific resource addresses.             |
| `--output`          |       | String      | No       | Output format (`json`, `table`, `yaml`, `tsv`).  |

## Examples

### Trigger a plan job

```bash
terrakube job create \
  -o "demo-org" \
  -w "docker-compose-infra" \
  --command "plan" \
  --output json
```

### Trigger an apply job on a custom branch

```bash
terrakube job create \
  -o "demo-org" \
  -w "docker-compose-infra" \
  --command "apply" \
  --override-branch "feat/new-cluster" \
  --output table
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.terrakube.io/2.33.0/user-guide/terrakube-cli/commands/job/create.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
