Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gr1m0h/terraform-backend-setup-scripts

Initialize Terraform S3 backend using CloudFormation.
https://github.com/gr1m0h/terraform-backend-setup-scripts

aws backend dynamodb infrastructure infrastructure-as-code s3 terraform

Last synced: about 2 months ago
JSON representation

Initialize Terraform S3 backend using CloudFormation.

Awesome Lists containing this project

README

        

# terraform-backend-setup-scripts
## Description
Build Terraform backend without using Terraform.

https://www.terraform.io/docs/backends/types/s3.html
> Terraform is an administrative tool that manages your infrastructure, and so ideally the infrastructure that is used by Terraform should exist outside of the infrastructure that Terraform manages. This can be achieved by creating a separate administrative AWS account which contains the user accounts used by human operators and any infrastructure and tools used to manage the other accounts. Isolating shared administrative tools from your main environments has a number of advantages, such as avoiding accidentally damaging the administrative infrastructure while changing the target infrastructure, and reducing the risk that an attacker might abuse production infrastructure to gain access to the (usually more privileged) administrative infrastructure.

## Usage
1. Run init.sh

```sh
$ bash init.sh
```

1. terraform init

```sh
$ terraform init \
-backend-config="bucket=" \
-backend-config="dynamodb_table="
```

### When removing the Terraform backend

```sh
$ aws cloudformation delete-stack --stack-name
```