A new Terraform backend utilising Oracle Cloud Infrastructure (OCI) Object Storage as the storage backend. Leveraging OCI Object Storage provides a scalable and cost-effective alternative to traditional backends, offering a robust solution for state file storage and management.
Attempted Solutions
Traditional Terraform backends, such as Amazon S3 and Azure Blob Storage, have been widely used for state file storage. However, for organisations operating within the Oracle Cloud ecosystem, OCI Object Storage presents an attractive option. This custom backend aims to facilitate Terraform deployments within OCI by seamlessly integrating with OCI Object Storage.
Proposal
The Terraform user configures the backend using the custom backend module, specifying theOCI Object Storage details.
```hcl
``` terraform {
backend "oci" {
bucket = ""
object = ""
namespace = ""
# Other OCI authentication details
tenancy_ocid = ""
user_ocid = ""
fingerprint = ""
private_key_path = ""
region = ""
}
}
--
2. During Terraform operations, the backend module interacts with OCI IAM to authenticate and obtain the necessary credentials.
3. The state file is read from or written to OCI Object Storage securely.
4. Access control policies ensure that only authorised users and services can interact with the state files.
### References
_No response_
OpenTofu Version
Use Cases
A new Terraform backend utilising Oracle Cloud Infrastructure (OCI) Object Storage as the storage backend. Leveraging OCI Object Storage provides a scalable and cost-effective alternative to traditional backends, offering a robust solution for state file storage and management.
Attempted Solutions
Traditional Terraform backends, such as Amazon S3 and Azure Blob Storage, have been widely used for state file storage. However, for organisations operating within the Oracle Cloud ecosystem, OCI Object Storage presents an attractive option. This custom backend aims to facilitate Terraform deployments within OCI by seamlessly integrating with OCI Object Storage.
Proposal
The Terraform user configures the backend using the custom backend module, specifying the OCI Object Storage details.
This seems to be supported already here through the s3 or remote backend api:
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformUsingObjectStore.htm
Is there a reason to not use those approaches to achieve this here?
@Yantrio , Object storage can support state lock without using dynamodb by using its rename API.