Skip to content

Latest commit

 

History

History
71 lines (50 loc) · 1.14 KB

README.md

File metadata and controls

71 lines (50 loc) · 1.14 KB

Terraform with Terratest Example Project

This repository demonstrates how to set up an AWS instance using Terraform and how to test it using Terratest.

Prerequisites

Project Structure

.
├── .github
│   └── workflows
│       └── ci.yml
├── Makefile
├── README.md
├── terraform
│   ├── main.tf
│   ├── outputs.tf
│   └── variables.tf
└── tests
    ├── go.mod
    └── main_test.go

How to Run

Terraform Setup

  1. Navigate to the terraform directory:
cd terraform
  1. Initialize Terraform:
terraform init
  1. Apply the Terraform code:
terraform apply

Test Setup

  1. Navigate to the tests directory:
cd tests
  1. Run the tests:
go test

Or you can use the provided Makefile to run the tests:

make test