Skip to content

Commit

Permalink
Merge pull request #4 from anandg112/chore/readme-updates-and-add-kic…
Browse files Browse the repository at this point in the history
…kstart

feat: update readme and add kickstart script
  • Loading branch information
anandg112 authored May 20, 2023
2 parents 38cb376 + 14a77d9 commit 753e1b8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
19 changes: 19 additions & 0 deletions kickstart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh -ex

terraform init -backend=true \
-backend-config=bucket\=tf-state-anand \
-backend-config=key\=state \
-backend-config=region\=us-east-1 \
-input=false \

NOW=$date

if [ $ACTION == "deploy" ]
then
echo "Deployment started at $NOW"
terraform apply -auto-approve
elif [ $ACTION == "destroy" ]
then
echo "Teardown started at $NOW"
terraform destroy -auto-approve
fi
15 changes: 12 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ This project sets up Postgres 9.6 on AWS and supports encryption at rest.

#### Set these variables in your `.envrc` file

```TF_VAR_user=anand
```bash
TF_VAR_user=anand
TF_VAR_owner=anand
TF_VAR_environment=dev
TF_VAR_dbname=postgres
Expand All @@ -21,14 +22,22 @@ ACTION=deploy

### Building the docker image

`docker build -f ./provisioner/Dockerfile -t rds-provisioner .`
```bash
docker build -f ./provisioner/Dockerfile -t rds-provisioner .
```

### Running the provisioner for Postgres on AWS

`docker run --env-file .envrc rds-provisioner`
```bash
docker run --env-file .envrc rds-provisioner
```

---

### Release

This project uses GitHub Actions to release new versions of the terraform module through semantic-release NPM package. GitHub Actions also performs a `terraform plan` `terraform fmt` to ensure module is tested and formatted properly.

### Still to do

#### ~~Add CI for checking code defects~~ - Done
Expand Down

0 comments on commit 753e1b8

Please sign in to comment.