iagctl db import
Import resources and services from a file.
The iagctl db import command imports services and resources from a service configuration file. Use this command to move services and resources from one gateway instance to another, or to import a file you’ve created manually.
You can import from a local file or from a repository. IAG also provides the --validate and --check flags to verify the import before applying changes.
Syntax
Usage notes
Validate an import
Use the --validate flag to verify that all resources in the file contain the required fields. If any fields are missing, the gateway returns details so you can resolve the issue.
Preview an import
Use the --check flag to preview the actions the gateway would take without making any changes. The gateway reports one of three states for each resource:
Force an import
Use the --force flag to override any existing resources that conflict with the imported file.
Examples
Import from a local file
Import from a repository over HTTP
Import from a repository over SSH with a private key
Validate a service file
Preview an import
Preview a forced import
Service file format
The following example shows the structure of a service configuration file: