Skip to main content

Object-storage

Infrahub provides an interface to store and retrieve files or objects in an object-storage. The object-storage is used internally within Infrahub to store rendered artifacts, but it can be used to store any text based file or content.

You can interface with the object-storage through the REST API and Python SDK. See the object-storage guide and object-storage Python SDK guide for more information.

Supported backends

At this moment Infrahub supports using local storage, or AWS S3 storage backends. Support for other storage backends will be added in the future.

Local storage

Infrahub can use local storage as a storage backend. It can be any directory on a filesystem that is attached to the system on which Infrahub runs. The only requirement is that all the Infrahub API servers and Git Agents need access to the filesystem.

To setup Infrahub to use local storage backend you can use the following configuration:

[storage]
driver = "local"

[storage.local]
path = "/opt/infrahub/storage/"

More details can be found in the configuration documentation.

AWS S3 storage

Infrahub can use AWS S3 or any other S3 API compatible storage as a storage system.

To setup Infrahub to use AWS S3 as a storage backend you can use the following configuration:

[storage]
driver = "s3"

[storage.s3]
access_key_id = "my_access_key"
secret_access_key = "secret_access_key"
bucket_name = "my-infrahub-bucket"
endpoint_url = "https://s3.eu-central-1.amazonaws.com"

More details can be found in the configuration documentation.

Object model

Objects or files stored within the object-storage, are identified by an identifier (UUID). An identifier is assigned to the object at time of creation within the object-storage. Interactions with the object then happen leveraging that identifier.