Dependencies
Storage
To add storage service to your deployment, add a type of storage section to your dependencies in project.outblocks.yaml configuration file:
dependencies:
  storage:
    name: my_bucket
    type: storage
    location: eu
    versioning: true
    public: true
    expire_versions_in_days: 14
    cors:
      - methods: [GET]
        origins: ['*']
Main configuration
| Option | Type | Value | Description | 
|---|---|---|---|
| name | string | (any string) | Name of the bucket. For example, in GCP it will result with: https://storage.cloud.google.com/<your_bucket_name>/. | 
| location | string | - en<br />- us | Specify the location for storage; refer to cloud provider docs for possible options. | 
| public | boolean | true/false | Makes whole storage public so that all objects can be accessed. | 
| versioning | boolean | true/false | Enables versioning for objects. | 
| max_versions | integer | number (default: 10) | The maximum amount of versions to keep. | 
| delete_in_days | integer | number (default: 10) | Delete new objects after X days. | 
| expire_versions_in_days | integer | number (default: 10) | Expire archived versions after X days. | 
| cors | array | number (default: 10) | Expire archived versions after X days. | 
CORS configuration
cors key is the list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins and means "any Origin."
- methods
 
| Option | Type | Value | Description | 
|---|---|---|---|
| methods | array of strings | GET, OPTIONS, POST, etc. | The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc.).<br/> Note: "*" is permitted in the list of methods and means "any method". | 
| origins | array of strings | (any string) | The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins and means "any Origin". | 
| response_headers | array of strings | list of HTTP headers | The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. | 
| max_age_in_seconds | integer | values in seconds | The value in seconds to return in the Access-Control-Max-Age header used in preflight responses. | 
For example, to allow all origins for GET call:
cors:
  - methods: [GET]
    origins: ['*']