github.com/darmach/terratest@v0.34.8-0.20210517103231-80931f95e3ff/examples/terraform-aws-rds-example/README.md (about)

     1  # Terraform AWS RDS Example
     2  
     3  This folder contains a simple Terraform module that deploys a database instance (MySQL by default) in [AWS](https://aws.amazon.com/)
     4  to demonstrate how you can use Terratest to write automated tests for your AWS Terraform code. This module deploys an [RDS
     5  Instance](https://aws.amazon.com/rds/) and associates it with an option group and parameter group to customize it.
     6  
     7  Check out [test/terraform_aws_rds_example_test.go](/test/terraform_aws_rds_example_test.go) to see how you can write
     8  automated tests for this module and validate the configuration of the parameters and options.
     9  
    10  This module does not use the database instance created in any way. It can be used though to validate any combination of inputs
    11  passed while creating database instances in AWS RDS. Hence the plain text simple password used here should not have any security
    12  implications.
    13  
    14  **WARNING**: This module and the automated tests for it deploy real resources into your AWS account which can cost you
    15  money. The resources are all part of the [AWS Free Tier](https://aws.amazon.com/rds/free/), so if you haven't used that up,
    16  it should be free, but you are completely responsible for all AWS charges.
    17  
    18  
    19  
    20  
    21  
    22  ## Running this module manually
    23  
    24  1. Sign up for [AWS](https://aws.amazon.com/).
    25  1. Configure your AWS credentials using one of the [supported methods for AWS CLI
    26     tools](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html), such as setting the
    27     `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables. If you're using the `~/.aws/config` file for profiles then export `AWS_SDK_LOAD_CONFIG` as "True".
    28  1. Set the AWS region you want to use as the environment variable `AWS_DEFAULT_REGION`.
    29  1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`.
    30  1. Run `terraform init`.
    31  1. Run `terraform apply`.
    32  1. When you're done, run `terraform destroy`.
    33  
    34  
    35  
    36  
    37  ## Running automated tests against this module
    38  
    39  1. Sign up for [AWS](https://aws.amazon.com/).
    40  1. Configure your AWS credentials using one of the [supported methods for AWS CLI
    41     tools](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html), such as setting the
    42     `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables. If you're using the `~/.aws/config` file for profiles then export `AWS_SDK_LOAD_CONFIG` as "True".
    43  1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`.
    44  1. Install [Golang](https://golang.org/) and make sure this code is checked out into your `GOPATH`.
    45  1. `cd test`
    46  1. `dep ensure`
    47  1. `go test -v -run TestTerraformAwsRdsExample`