diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 1b11052..f1e4ea7 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.0 +current_version = 1.0.1 commit = True message = Bumps version to {new_version} tag = False diff --git a/CHANGELOG.md b/CHANGELOG.md index 24ef36d..0e152c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +### 1.0.1 + +**Released**: 2019.10.02 + +**Commit Delta**: [Change from 1.0.0 release](https://github.com/plus3it/terraform-aws-tardigrade-vpc-endpoints/compare/1.0.0...1.0.1) + +**Summary**: + +* Update testing harness to have a more user-friendly output +* Update terratest dependencies + ### 1.0.0 **Released**: 2019.09.11 diff --git a/README.md b/README.md index 98afb7b..21fcf19 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Terraform module to create VPC Endpoints | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| create\_vpc\_endpoints | toggle to create vpc endpoints | string | `"true"` | no | +| create\_vpc\_endpoints | toggle to create vpc endpoints | bool | `"true"` | no | | subnet\_ids | target subnet ids | list(string) | `` | no | | tags | A map of tags to add to the VPC endpoint SG | map(string) | `` | no | | vpc\_endpoint\_interfaces | List of aws api endpoints that are used to create VPC Interface endpoints. See https://docs.aws.amazon.com/general/latest/gr/rande.html for full list. | list(string) | `` | no | diff --git a/tests/module_test.go b/tests/module_test.go index 61254e3..f5ad2ef 100644 --- a/tests/module_test.go +++ b/tests/module_test.go @@ -19,26 +19,24 @@ func TestModule(t *testing.T) { for _, f := range files { // look for directories with test cases in it if f.IsDir() && f.Name() != "vendor" { - investigateDirectory(t, f) + t.Run(f.Name(), func(t *testing.T) { + // check if a prereq directory exists + prereqDir := f.Name() + "/prereq/" + if _, err := os.Stat(prereqDir); err == nil { + prereqOptions := createTerraformOptions(prereqDir) + defer terraform.Destroy(t, prereqOptions) + terraform.InitAndApply(t, prereqOptions) + } + + // run terraform code for test case + terraformOptions := createTerraformOptions(f.Name()) + defer terraform.Destroy(t, terraformOptions) + terraform.InitAndApply(t, terraformOptions) + }) } } } -func investigateDirectory(t *testing.T, directory os.FileInfo) { - // check if a prereq directory exists - prereqDir := directory.Name() + "/prereq/" - if _, err := os.Stat(prereqDir); err == nil { - prereqOptions := createTerraformOptions(prereqDir) - defer terraform.Destroy(t, prereqOptions) - terraform.InitAndApply(t, prereqOptions) - } - - // run terraform code for test case - terraformOptions := createTerraformOptions(directory.Name()) - defer terraform.Destroy(t, terraformOptions) - terraform.InitAndApply(t, terraformOptions) -} - func createTerraformOptions(directory string) *terraform.Options { terraformOptions := &terraform.Options{ TerraformDir: directory, diff --git a/variables.tf b/variables.tf index 2434b5b..af09f6b 100644 --- a/variables.tf +++ b/variables.tf @@ -1,6 +1,6 @@ variable "create_vpc_endpoints" { - type = string description = "toggle to create vpc endpoints" + type = bool default = true }