github.com/terraform-modules-krish/terratest@v0.29.0/examples/terraform-aws-ssm-example/README.md (about)

     1  # Terraform AWS SSM Example
     2  
     3  This folder contains a simple Terraform module that deploys an instance in [AWS](https://aws.amazon.com/)
     4  and registers it in the AWS SSM Catalog to demonstrate how you can use Terratest to write automated tests for your AWS Terraform code.
     5  
     6  Check out [test/terraform_aws_ssm_example_test.go](https://github.com/terraform-modules-krish/terratest/blob/v0.29.0/test/terraform_aws_ssm_test.go) to see how
     7  you can write automated tests for this module.
     8  
     9  **WARNING**: This module and the automated tests for it deploy real resources into your AWS account which can cost you
    10  money. The resources are all part of the [AWS Free Tier](https://aws.amazon.com/free/), so if you haven't used that up,
    11  it should be free, but you are completely responsible for all AWS charges.
    12  
    13  
    14  
    15  ## Running this module manually
    16  
    17  1. Sign up for [AWS](https://aws.amazon.com/).
    18  1. Configure your AWS credentials using one of the [supported methods for AWS CLI
    19     tools](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html), such as setting the
    20     `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".
    21  1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`.
    22  1. Run `terraform init`.
    23  1. Run `terraform apply`.
    24  1. When you're done, run `terraform destroy`.
    25  
    26  
    27  
    28  
    29  ## Running automated tests against this module
    30  
    31  1. Sign up for [AWS](https://aws.amazon.com/).
    32  1. Configure your AWS credentials using one of the [supported methods for AWS CLI
    33     tools](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html), such as setting the
    34     `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".
    35  1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`.
    36  1. Install [Golang](https://golang.org/) and make sure this code is checked out into your `GOPATH`.
    37  1. `cd test`
    38  1. `go test -v -run TestTerraformAwsSsmExample`