Home

Awesome

About the project

This project is targeting to provide an easy to use s3 backend for terraform.
You may complain that there is already a built-in backend for aws s3 which can be used. And yes - you are right the is something similar but also different as this approach. Further details can be found here

Features

Demo

A demo installation can be found here (admin/r3pl4c3m3).

Screenshots

New project

alt text

Project status

alt text alt text alt text

Problems of the build-in s3 backend

Idea behind this approach

The idea is to make it as easy as possible to use remote beackends. At the same time a normal level of security should be keeped.
To achive this, the project has just need to be set up ONCE for your organization. Afterward, everyone can set up the backend for terraform by his own.
By to so, a new uniqe ID will be created which can be used. Currently the ID is an random alpha numerical key.

To use it an HTTP endpoint is provided which can add to your terraform project. In behind all data (tfstate and config) are stored in a bucket in a folder named after the project id. This bucket has versioning enabled of cause.

Setup

Deploy the server-side

git clone https://github.com/derBroBro/terraform-http-backend.git
cd terraform-http-backend/deploy
terraform apply

You must provide a name for the project. This will be used for the functions, IAM user and the bucket.

Using a cust domains

Using custom domains is quite easy, just pass in the domain and cert_arn variables. The cert_arn must be a verfied ACM certificate in the us-east-1 region. After this you need to create a CNAME Record for your domain pointing to the API Gateways Endpoint. Details what to configure will be shown in the outputs.

Webhooks and Mails

Changes on the config, as well as on the state will be pushed to an SNS topic created.
If you want to get informed, just create an fitting subscription.

For each project

Visit your https://yourdomain/project/new to create a new project.
After creation you will get to the overview of your project. On this you find also an backend_http.tf config which should be added to your projects.

Further opportunities

There are a lot of extensions possible for this backend. Just some ideas:

Todo