Skip to Content

Import

Create projects and organization resources from a Git repository or a pasted document, and what an export leaves out.

The dashboard's Import dialog has two options.

From a Git repository

Pick a repository, a branch and the directory that holds a project.yaml. A-Line.cloud creates the project, links it to that directory and runs the first apply. From then on the repository is the project's source of truth, as described in GitOps.

Before creating anything, the dialog shows a preview that writes nothing. The import is refused when the project name is taken in the environment (409), when the GitHub connection can't read the repository's contents, and when the branch or the project.yaml doesn't exist. Importing only reads the repository, so write access is not needed.

Previewing and importing need the member role in the target environment. See who can do what for the other link actions.

Paste or upload a document

Paste or upload a single project file, or an organization bundle that holds organization resources and several projects. An export of an organization has the same shape, so you can copy resources from one organization to another.

a-line-org.yaml
# yaml-language-server: $schema=https://a-line.cloud/schemas/iac/v1.json
version: 1
kind: org
tenant:
  buckets:
    - name: assets
      quota_gb: 50
  storages:
    - name: archive
      endpoint: https://s3.example.net
      region: eu-central-1
      bucket: archive
  domains:
    - name: example.com
      scope: domain
projects:
  - name: shop
    environment: prod
    egress:
      mode: public
KeyMeaning
kindAlways org.
tenantbuckets, storages, domains (with name and scope) and dns_zones.
projectsProjects, each with the project file keys plus environment, the environment to create it in. It can be left out when the organization has one environment.

The document is at most 512 KiB, and an organization can plan at most 10 imports an hour (import_rate_limited).

Plan, then apply

An import first shows a plan: one row per resource with what will happen. Nothing is written until you confirm it.

RowMeaning
CreateThe resource is created.
Pending verificationThe domain is claimed and must be verified before it can be used.
ReuseA resource with that name exists and is kept as it is.
ConflictA resource with that name exists; the import is refused with name_taken.
SkipApps are listed but not created: add them through a link or in the dashboard.

A name that already exists is a conflict by default. Choose to reuse existing resources to keep them instead. Other refusals:

CodeWhy
zones_unsupportedDNS zones can't be imported yet. Create them in the dashboard or with a zone file.
environment_not_found, environment_requiredThe project's environment doesn't exist, or is missing while the organization has several.
no_clusterThe environment has no cluster to create the project in.
forbiddenOrganization resources and project quotas need an organization admin; projects need an environment admin.

An import only creates. The resources it creates are not managed by a link: a link that later declares one with the same name adopts it.

Secrets stay out

Neither format carries credentials: a storage entry has no access keys, and its connection waits for them to be entered in the dashboard.

What an export leaves out

An export writes what is stored and applied, as files. Exporting a project needs an environment admin, exporting the organization an organization admin. Linking an existing project writes the same files to its directory: as a commit in direct mode, or as an "Add A-Line config" pull request in pull-request mode, with the link pending until it is merged. A read-only link exports through the same pull request (the export needs the write-back App); after that, the console only shows the project (see change modes). Creating a project from a repository in read-only mode writes nothing and needs no write-back App.

Left outInstead
Environment variable valuesEach key is written as its reference, or as external: true for a plain value.
Secret valuesOnly the names of the app's secret groups are listed.
Storage credentialsThe storage is listed without access keys.
Held changes that are not confirmed yetOnly applied state is written.
A workload namespace's on switchIt has no file form; the egress and quota keys are written.
Default settingsPublic outbound traffic, unset quotas, isolated: false, no connections and an app's default DNS target are left out, so the file doesn't take ownership of them. A single HTTP port is written as port.

On this page