Skip to content

overlane deploy target add

Add a deploy target with its provider token

Updated View as MarkdownOpen in ChatGPTOpen in Claude

Adds a target on a provider this project can use (see overlane deploy providers). Kind settings come from –set: workers (Cloudflare, your account) needs scriptName and accountId; vercel needs projectRef (teamId optional); netlify needs siteId; fly needs app (machineId optional); aws needs region and functionName (its token is ACCESS_KEY_ID:SECRET_ACCESS_KEY); container (an image on Fly Machines) needs app and image, with port, machineId, channel.<environment>=<tag>, and database=postgres with databaseVersion, migrationCommand and migrationPath; overlane-hosting (Overlane Hosting) takes no settings and no token. The provider token comes from an environment variable or standard input and goes to the encrypted vault. Storing the provider token is a safety class: it needs an approval from an independent agent (evidence and a reason) or a person first.

Usage

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

Arguments

Argument Required Description
name yes A name for the target, lowercase letters, digits and dashes

Flags

Flag Type Required Default Description
--kind one of workers, overlane-hosting, vercel, netlify, fly, aws, container yes The provider
--set string (repeatable) no A setting for the kind; repeat for more
--credential-env string no Read the provider token from this environment variable
--stdin boolean no Read the 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

overlane deploy target add site --kind workers --set scriptName=site --set accountId=abc123 --credential-env CF_API_TOKEN
overlane deploy target add web --kind netlify --set siteId=my-site --stdin --dry-run
overlane deploy target add shop --kind container --set app=shop --set image=registry.fly.io/shop --set channel.production=stable --set database=postgres --set migrationCommand='npm run migrate' --credential-env FLY_API_TOKEN
overlane deploy target add app --kind overlane-hosting

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 add.

Result

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

{
  "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 for the status the process returns.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close

Overlane Agent

Ask about the docs. Answers are quoted from the pages, with links. This panel cannot change anything.

    Questions are answered in your browser from the docs index. Nothing you type here is stored or sent anywhere.