Using Linode (object storage) to store Terraform state file

Hi guys,

has any used Linode object storage to store Terraform state file, similar to what is described here: Backend Type: s3 | Terraform | HashiCorp Developer

Any guidance would be greatly appreciated.

Thank you!

I haven’t seen anyone specifically use Linode Object Storage to store the Terraform state file. AWS S3 is commonly used for object storage to store the Terraform state file. I think Linode Object Storage would be a good option to store the state file.

You could easily sync this to a Linode S3 using a plug-in or Linode API/CLI.

1 Like

I believe that you can config the custom S3 endpoint in Terraform to store the state file on Linode Object Storage.

The endpoint URL of a Linode object storage would be hostname of the bucket, which you can get from Linode Object Storage Bucket API, trimming the bucket name prefix, for example:
Hostname: example-bucket.us-east-1.linodeobjects.com
S3 Endpoint: us-east-1.linodeobjects.com

1 Like

I have an example using GitHub actions HERE. The GH workflow YAML file builds a backend file that contains the Linode S3 keys and settings for the connection. Then this backend file is referenced in the terraform init command.
You can check the rest of the TF code for this workflow HERE.

2 Likes