90DaysOfDevOps/Tools/8.IaC/Tarraform
2022-01-09 00:31:33 +05:30
..
awsResource Update Structure and added IaC codes 2022-01-09 00:31:33 +05:30
test Update Structure and added IaC codes 2022-01-09 00:31:33 +05:30
README.md Update Structure and added IaC codes 2022-01-09 00:31:33 +05:30

TerratestWithTerraform

Terratest is a Go library developed at Gruntwork, that makes it easier to write automated tests for our infrastructure code. It provides a variety of helper functions and patterns for common infrastructure testing tasks but here we will be discussing about Testing Terraform code.

To Run this application


go mod init "<MODULE_NAME>" would create go.mod file into test folder.

  • The go.mod file is the root of dependency management in GoLang.
  • All the modules which are needed or to be used in the project are maintained here in go.mod file.
  • It creates entry for all the packages we are going to use/import in our project.
  • It reduces effort for getting each dependencies manually.

On running go test for the first time you would get go.sum file created.

  • go.sum file is created when go test or go build is executed for the first time.
  • It installs all the packages with specific version(latest)
  • we do not need to edit or modify this file.