Prefect storage create without interactive mode

Is there a way to run:
prefect storage create

Without going through the interactive prompts?

Ideally
prefect storage create -s gcs

1 Like

Kind of - you can create a storage block in your deployment spec, e.g.

from prefect.blocks.storage import LocalStorageBlock

DeploymentSpec(
    name="block_storage_test",
    flow=work_queue_test_flow,
    flow_storage=LocalStorageBlock(),
    flow_runner=SubprocessFlowRunner(condaenv="orionqa"),
)

More info here:
https://discourse.prefect.io/t/when-should-i-use-filestorageblock-vs-specific-cloud-platform-storage-block-such-as-s3storageblock-googlecloudstorageblock-or-azureblobstorageblock/924