Skip to content

admin storage create

Register a storage for imports and exports.

Usage

Credentials

  • Role/workload-based credentials via Azure Workload Identity on AKS or Amazon IAM Roles for Service Accounts on EKS. This is recommended when available as it doesn't require provisioning and managing access keys. Please reach out to support@flywheel.io for setting up service credentials.
  • User-provided credentials (e.g.: access key) for the specific cloud provider. Explicit credentials can be passed as query params as part of the storage URI.

Storage URIs

  • Azure Blob Storage Container URI
  • format: az://<account>/<container>[/<prefix>][?params]
  • credential params:
    • ?connector_creds=true (only available when hosted on Azure) or
    • ?access_key=<access_key> or
    • ?tenant_id=<tenant_id>&client_id=<client_id>&client_secret=<client_secret>
  • Amazon S3 URI
  • format: s3://bucket[/prefix]
  • credential params:
    • ?connector_creds=true (only available when hosted on AWS) or
    • ?access_key_id=<access_key_id>&secret_access_key=<secret_access_key>
  • Google Storage Bucket URI
  • format: gs://bucket[/prefix]
  • credential params:
    • ?application_credentials=<path_to_service_account.json>

Reference files in place

To reference files in place when running imports, the source storage must be created from an existing, read-only storage provider in Core-API with the --provider option.

An example to create a read-only storage provider in Core-API:

curl -XPOST https://<DOMAIN>/api/site/providers \
    -H "Content-Type: application/json" \
    -H "Authorization: <API_KEY>" \
    -d @- << EOF
{
    "label": "ref-in-place",
    "provider_class": "storage",
    "provider_type": "aws",
    "creds": {"aws_access_key_id": "<ID>", "aws_secret_access_key": "<KEY>"},
    "config": {"region": "<REGION>", "bucket": "<BUCKET>"},
    "access_type": "read-only"
}
EOF

Check the Core-API docs for other storage types: https://<DOMAIN>/api/docs#/site/create_provider_api_site_providers_post.

Once the storage provider is created, you can use the provider ID to create the storage in xfer for imports:

flyw admin storage create --provider PROVIDER_ID