---
title: "overlane deploy target update"
description: "Rename a deploy target, change its settings or replace its token"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.overlane.app/llms.txt
> Use this file to discover all available pages before exploring further.

# overlane deploy target update

{/* Generated by apps/docs/scripts/generate.mjs (CLI pages from the command registry in packages/cli). Do not edit; run `pnpm --filter @overlane/docs gen`. */}

Changes a target's name or its kind settings (--set KEY=VALUE, the same keys as `deploy target add`) and, with --credential-env or --stdin, replaces the provider token in the encrypted vault. A target keeps its provider: to change provider, remove it and add another. An Overlane Hosting target takes no token. The token is never printed.

## Usage

```sh
overlane deploy target update target [--name NAME] [--kind KIND] [--set KEY=VALUE...] [--credential-env VAR] [--stdin] [--dry-run]
```

## Arguments

| Argument | Required | Description |
| --- | --- | --- |
| `target` | yes | The target name or ID |

## Flags

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--name` | string | no |  | A new name for the target |
| `--kind` | one of `workers`, `overlane-hosting`, `vercel`, `netlify`, `fly`, `aws`, `container` | no |  | The target's provider; needed with --set, and must match the target |
| `--set` | string (repeatable) | no |  | A setting for the kind; repeat for more |
| `--credential-env` | string | no |  | Read the new provider token from this environment variable |
| `--stdin` | boolean | no |  | Read the new provider token from standard input |
| `--dry-run` | boolean | no |  | Print the requests and file changes this command would make, then stop. Needs no credentials. |

## Examples

```sh
overlane deploy target update site --name web
overlane deploy target update site --kind workers --set scriptName=site-2 --set accountId=abc123
overlane deploy target update site --credential-env CF_API_TOKEN
```

## Behavior

- Effect: `write` (changes local or hosted state).
- Needs credentials: yes. Uses the network: yes.
- Supports `--dry-run`: yes. Accepts `--force`: no.
- Machine-readable description: `overlane schema deploy target update`.

## Result

With `--json` (the default when stdout is not a terminal) the command prints this JSON Schema's shape on stdout.

```json
{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
          "description": "tenant identifier"
        },
        "target": {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "string",
              "const": "1"
            },
            "tenantId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
              "description": "tenant identifier"
            },
            "projectId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
              "description": "project identifier"
            },
            "targetId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "name": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,40}$"
            },
            "config": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "workers"
                    },
                    "scriptName": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    },
                    "accountId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    }
                  },
                  "required": [
                    "kind",
                    "scriptName",
                    "accountId"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "vercel"
                    },
                    "projectRef": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    },
                    "teamId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    }
                  },
                  "required": [
                    "kind",
                    "projectRef"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "netlify"
                    },
                    "siteId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    }
                  },
                  "required": [
                    "kind",
                    "siteId"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "fly"
                    },
                    "app": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    },
                    "machineId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    }
                  },
                  "required": [
                    "kind",
                    "app"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "overlane-hosting"
                    },
                    "scriptName": {
                      "type": "string",
                      "pattern": "^olh-[0-9a-f]{16}$"
                    }
                  },
                  "required": [
                    "kind",
                    "scriptName"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "aws"
                    },
                    "region": {
                      "type": "string",
                      "pattern": "^[a-z]{2}(?:-[a-z]+)+-[0-9]$"
                    },
                    "functionName": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    }
                  },
                  "required": [
                    "kind",
                    "region",
                    "functionName"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "container"
                    },
                    "app": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    },
                    "machineId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                    },
                    "image": {
                      "type": "string",
                      "pattern": "^[a-z0-9][a-z0-9._\\-/:]{0,254}$"
                    },
                    "channels": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9-]{0,40}$"
                      },
                      "additionalProperties": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$"
                      }
                    },
                    "port": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 65535
                    },
                    "database": {
                      "type": "object",
                      "properties": {
                        "engine": {
                          "type": "string",
                          "const": "postgres"
                        },
                        "version": {
                          "type": "string",
                          "pattern": "^[0-9]{1,2}$"
                        },
                        "migrations": {
                          "type": "object",
                          "properties": {
                            "command": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "path": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$"
                            }
                          },
                          "required": [
                            "command"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "engine"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "kind",
                    "app",
                    "image",
                    "channels"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "vaultRef": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 128
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          "required": [
            "schemaVersion",
            "tenantId",
            "projectId",
            "targetId",
            "name",
            "config",
            "vaultRef",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "tenantId",
        "target"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "dryRun": {
          "type": "boolean",
          "const": true
        },
        "service": {
          "type": "string"
        },
        "requests": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "method": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "body": {},
              "note": {
                "type": "string"
              }
            },
            "required": [
              "method",
              "path"
            ],
            "additionalProperties": false
          }
        },
        "commands": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "writes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "action": {
                "type": "string",
                "enum": [
                  "write",
                  "append",
                  "delete"
                ]
              },
              "description": {
                "type": "string"
              }
            },
            "required": [
              "path",
              "action",
              "description"
            ],
            "additionalProperties": false
          }
        },
        "notes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "dryRun",
        "requests",
        "commands",
        "writes",
        "notes"
      ],
      "additionalProperties": false
    }
  ]
}
```

See [exit codes](/cli/#exit-codes) for the status the process returns.

Source: https://docs.overlane.app/cli/deploy-target-update/index.mdx
