2019-09-04 20:22:20 +00:00
---
2020-01-18 00:18:09 +00:00
layout: docs
page_title: OCI Object Storage - Storage Backends - Configuration
description: >-
The OCI Object Storage backend is used to persist Vault's data in OCI Object
Storage.
2019-09-04 20:22:20 +00:00
---
2019-09-05 17:26:05 +00:00
# OCI Object Storage Storage Backend
2019-09-04 20:22:20 +00:00
2019-09-05 17:26:05 +00:00
The OCI Object Storage backend is used to persist Vault's data in OCI Object Storage.
2019-09-04 20:22:20 +00:00
2019-09-05 17:26:05 +00:00
- **High Availability** – the OCI Object Storage backend supports high availability.
2019-09-04 20:22:20 +00:00
2019-09-05 17:26:05 +00:00
- **Community Supported** – the OCI Object Storage backend is supported by the community. While it has undergone review by HashiCorp employees, they may not be as knowledgeable about the technology. If you encounter problems with them, you may be referred to the original author.
2019-09-04 20:22:20 +00:00
```hcl
2019-10-01 23:08:34 +00:00
storage "oci" {
2020-10-26 22:28:32 +00:00
region = "<oci_region>"
2019-09-04 20:22:20 +00:00
namespace_name = "<object_storage_namespace_name>"
bucket_name = "<vault_data_bucket_name>"
ha_enabled = "<boolean true/false>"
lock_bucket_name = "<leader_lock_bucket_name>"
auth_type_api_key = "<boolean setting for using api-key instead of instance principals>"
}
```
2019-09-05 17:26:05 +00:00
For more information on OCI Object Storage, please see the Oracle's [OCI Object Storage documentation][ocios-docs].
2019-09-04 20:22:20 +00:00
2019-10-01 23:08:34 +00:00
## `oci` Setup
2019-09-04 20:22:20 +00:00
2019-09-05 17:26:05 +00:00
To use the OCI Object Storage Vault storage backend, you must have a OCI account. Either using the API or web interface, create the data bucket and lock bucket if enabling high availability.
2019-09-04 20:22:20 +00:00
2019-09-05 17:26:05 +00:00
The OCI Object Storage backend does not support creating the buckets automatically at this time.
2019-09-04 20:22:20 +00:00
2019-10-01 23:08:34 +00:00
## `oci` Authentication
2019-09-04 20:22:20 +00:00
2019-09-05 17:26:05 +00:00
The OCI Object Storage Vault storage backend uses the official OCI Golang SDK. This means it supports the common ways of providing credentials to OCI.
2019-09-04 20:22:20 +00:00
2020-01-18 00:18:09 +00:00
For more information on service accounts, please see the [OCI Identity documentation][oci-identity].
2019-09-04 20:22:20 +00:00
2019-10-01 23:08:34 +00:00
## `oci` Parameters
2019-09-04 20:22:20 +00:00
2020-12-17 21:53:33 +00:00
- `region` `(string: <optional>)` - Specifies the OCI region where Vault should look for object storage buckets. If not specified the OCI Storage Backend will use the region specified in your OCI credentials configuration.
2020-10-26 22:28:32 +00:00
2019-09-05 17:26:05 +00:00
- `namespace_name` `(string: <required>)` – Specifies the name of the OCI Object Storage namespaces containing the data bucket and the lock bucket.
2019-09-04 20:22:20 +00:00
2020-10-26 22:28:32 +00:00
- `bucket_name` `(string: <required>)` - Specifies the name of the bucket that will be used to store the Vault data.
2019-09-04 20:22:20 +00:00
### High Availability Parameters
- `ha_enabled` `(string: "<required>")` - Specifies if high availability mode is
enabled. This is a boolean value, but it is specified as a string like "true"
or "false".
- `lock_bucket_name` `(string: "<required>")` - Specifies the name of the bucket that will be used to store the node lease data.
2019-10-01 23:08:34 +00:00
## `oci` Examples
2019-09-04 20:22:20 +00:00
### Standalone Vault instance
2019-09-05 17:26:05 +00:00
This example shows configuring OCI Object Storage as a standalone instance.
2019-09-04 20:22:20 +00:00
```hcl
2019-10-01 23:08:34 +00:00
storage "oci" {
namespace_name = "MyNamespace"
2019-09-04 20:22:20 +00:00
bucket_name = "DataBucket"
}
```
### High Availability
2019-09-05 17:26:05 +00:00
This example shows configuring OCI Object Storage with high availability enabled.
2019-09-04 20:22:20 +00:00
```hcl
2019-10-01 23:08:34 +00:00
storage "oci" {
namespace_name = "MyNamespace"
2019-09-23 23:02:08 +00:00
bucket_name = "DataBucket"
2019-09-04 20:22:20 +00:00
ha_enabled = "true"
2019-09-23 23:02:08 +00:00
lock_bucket_name = "LockBucket"
2019-09-04 20:22:20 +00:00
}
```
[oci-identity]: https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm
[ocios-docs]: https://docs.cloud.oracle.com/iaas/Content/Object/Concepts/objectstorageoverview.htm