https://github.com/tomarv2/terraform-aws-rds
Terraform module for AWS RDS Instance and Cluster
https://github.com/tomarv2/terraform-aws-rds
aws rds-aurora rds-database terraform terraform-module
Last synced: about 1 month ago
JSON representation
Terraform module for AWS RDS Instance and Cluster
- Host: GitHub
- URL: https://github.com/tomarv2/terraform-aws-rds
- Owner: tomarv2
- License: apache-2.0
- Created: 2021-02-17T19:56:38.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T05:01:33.000Z (about 2 years ago)
- Last Synced: 2025-03-22T15:49:52.404Z (about 1 month ago)
- Topics: aws, rds-aurora, rds-database, terraform, terraform-module
- Language: HCL
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Terraform module for [AWS RDS](https://registry.terraform.io/modules/tomarv2/rds/aws/latest)
####
> :arrow_right: Terraform module for [Google Cloud SQL](https://registry.terraform.io/modules/tomarv2/cloud-sql/google/latest)
> :arrow_right: Terraform module for [Azure DB for MySQL](https://registry.terraform.io/modules/tomarv2/mysql/azure/latest)
`terraform-aws-rds` makes it easy to create AWS RDS Instance and Cluster.
### Versions
- Module tested for Terraform 1.0.1.
- AWS provider version [4.35](https://registry.terraform.io/providers/hashicorp/aws/latest)
- `main` branch: Provider versions not pinned to keep up with Terraform releases
- `tags` releases: Tags are pinned with versions (use
in your releases)
### Usage
#### Option 1:
```
terrafrom init
terraform plan -var='teamid=tryme' -var='prjid=project1'
terraform apply -var='teamid=tryme' -var='prjid=project1'
terraform destroy -var='teamid=tryme' -var='prjid=project1'
```
**Note:** With this option please take care of remote state storage#### Option 2:
##### Recommended method (stores remote state in remote backend(S3, Azure storage, or Google bucket) using `prjid` and `teamid` to create directory structure):
- Create python 3.8+ virtual environment
```
python3 -m venv
```- Install package:
```
pip install tfremote --upgrade
```- Set below environment variables:
```
export TF_AWS_BUCKET=
export TF_AWS_BUCKET_REGION=us-west-2
export TF_AWS_PROFILE=
```or
- Set below environment variables:
```
export TF_AWS_BUCKET=
export TF_AWS_BUCKET_REGION=us-west-2
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
```- Updated `examples` directory with required values.
- Run and verify the output before deploying:
```
tf -c=aws plan -var='teamid=foo' -var='prjid=bar'
```- Run below to deploy:
```
tf -c=aws apply -var='teamid=foo' -var='prjid=bar'
```- Run below to destroy:
```
tf -c=aws destroy -var='teamid=foo' -var='prjid=bar'
```**Note:** Read more on [tfremote](https://github.com/tomarv2/tfremote)
Please refer to examples directory [link](examples) for references.