From 1380946afee370165fb9503a419867b2e42eeebc Mon Sep 17 00:00:00 2001 From: Yevgeniy Brikman Date: Thu, 22 Apr 2021 15:26:22 +0100 Subject: [PATCH 1/5] Update versions --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 064140b1a..d39f7b6a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,8 +3,8 @@ env: &env GRUNTWORK_INSTALLER_VERSION: v0.0.34 MODULE_CI_VERSION: v0.29.2 MODULE_GCP_CI_VERSION: v0.1.1 - TERRAFORM_VERSION: 0.14.0 - TERRAGRUNT_VERSION: v0.24.2 + TERRAFORM_VERSION: 0.15.0 + TERRAGRUNT_VERSION: v0.28.24 PACKER_VERSION: 1.6.6 GO_VERSION: 1.14 K8S_VERSION: v1.15.0 # Same as EKS From 3e5514efc6ad1e4c6bf483c9b655cf7536f0d3ef Mon Sep 17 00:00:00 2001 From: Yevgeniy Brikman Date: Fri, 23 Apr 2021 10:22:25 +0100 Subject: [PATCH 2/5] Update tests to use new plan text --- modules/terraform/plan_test.go | 2 +- modules/terraform/show_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/terraform/plan_test.go b/modules/terraform/plan_test.go index c2ab4b3cf..ab7fd5224 100644 --- a/modules/terraform/plan_test.go +++ b/modules/terraform/plan_test.go @@ -80,7 +80,7 @@ func TestInitAndPlanWithPlanFile(t *testing.T) { out, err := InitAndPlanE(t, options) require.NoError(t, err) assert.Contains(t, out, "1 to add, 0 to change, 0 to destroy.") - assert.Contains(t, out, fmt.Sprintf("This plan was saved to: %s", planFilePath)) + assert.Contains(t, out, fmt.Sprintf("Saved the plan to: %s", planFilePath)) assert.FileExists(t, planFilePath, "Plan file was not saved to expected location:", planFilePath) } diff --git a/modules/terraform/show_test.go b/modules/terraform/show_test.go index e7e3a4f63..c7e21a270 100644 --- a/modules/terraform/show_test.go +++ b/modules/terraform/show_test.go @@ -25,7 +25,7 @@ func TestShowWithInlinePlan(t *testing.T) { } out := InitAndPlan(t, options) - require.Contains(t, out, fmt.Sprintf("This plan was saved to: %s", planFilePath)) + require.Contains(t, out, fmt.Sprintf("Saved the plan to: %s", planFilePath)) require.FileExists(t, planFilePath, "Plan file was not saved to expected location:", planFilePath) // show command does not accept Vars From 8efe359f880b75959d33bf7715d714445fd35722 Mon Sep 17 00:00:00 2001 From: Yevgeniy Brikman Date: Fri, 23 Apr 2021 10:22:35 +0100 Subject: [PATCH 3/5] Add missing build tag to azure test --- test/azure/terraform_azure_postgresql_example_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/azure/terraform_azure_postgresql_example_test.go b/test/azure/terraform_azure_postgresql_example_test.go index e272748fe..48775354c 100644 --- a/test/azure/terraform_azure_postgresql_example_test.go +++ b/test/azure/terraform_azure_postgresql_example_test.go @@ -1,3 +1,8 @@ +// +build azure + +// NOTE: We use build tags to differentiate azure testing because we currently do not have azure access setup for +// CircleCI. + package test import ( From 581eb59534cb67ce4d271e664a82da9cb227520a Mon Sep 17 00:00:00 2001 From: Yevgeniy Brikman Date: Fri, 23 Apr 2021 11:18:32 +0100 Subject: [PATCH 4/5] Dynamically pick instance types This ensures we always pick an instance type available in every AZ of our chosen AWS region --- examples/terraform-asg-scp-example/main.tf | 2 +- examples/terraform-asg-scp-example/variables.tf | 5 +++++ examples/terraform-aws-example/main.tf | 2 +- examples/terraform-aws-example/variables.tf | 5 +++++ examples/terraform-aws-ssm-example/main.tf | 2 +- examples/terraform-aws-ssm-example/variables.tf | 6 ++++++ examples/terraform-http-example/main.tf | 2 +- examples/terraform-http-example/variables.tf | 5 +++++ examples/terraform-packer-example/main.tf | 2 +- examples/terraform-packer-example/variables.tf | 5 +++++ examples/terraform-redeploy-example/main.tf | 2 +- examples/terraform-redeploy-example/variables.tf | 5 +++++ examples/terraform-ssh-example/main.tf | 4 ++-- examples/terraform-ssh-example/variables.tf | 5 +++++ examples/terraform-ssh-password-example/main.tf | 2 +- examples/terraform-ssh-password-example/variables.tf | 5 +++++ test/terraform_aws_example_plan_test.go | 4 ++++ test/terraform_aws_example_test.go | 4 ++++ test/terraform_aws_ssm_example_test.go | 6 +++++- test/terraform_http_example_test.go | 4 ++++ test/terraform_packer_example_test.go | 4 ++++ test/terraform_redeploy_example_test.go | 4 ++++ test/terraform_scp_example_test.go | 4 ++++ test/terraform_ssh_example_test.go | 4 ++++ test/terraform_ssh_password_example_test.go | 4 ++++ 25 files changed, 87 insertions(+), 10 deletions(-) diff --git a/examples/terraform-asg-scp-example/main.tf b/examples/terraform-asg-scp-example/main.tf index a76cc0d3c..b66799d33 100644 --- a/examples/terraform-asg-scp-example/main.tf +++ b/examples/terraform-asg-scp-example/main.tf @@ -26,7 +26,7 @@ provider "aws" { resource "aws_launch_template" "sample_launch_template" { name_prefix = var.instance_name image_id = data.aws_ami.ubuntu.id - instance_type = "t2.micro" + instance_type = var.instance_type vpc_security_group_ids = [aws_security_group.example.id] key_name = var.key_pair_name } diff --git a/examples/terraform-asg-scp-example/variables.tf b/examples/terraform-asg-scp-example/variables.tf index 89301bfd9..4946870d1 100644 --- a/examples/terraform-asg-scp-example/variables.tf +++ b/examples/terraform-asg-scp-example/variables.tf @@ -39,3 +39,8 @@ variable "ssh_port" { default = 22 } +variable "instance_type" { + description = "The EC2 instance type to run." + type = string + default = "t2.micro" +} \ No newline at end of file diff --git a/examples/terraform-aws-example/main.tf b/examples/terraform-aws-example/main.tf index b294f5510..8e864a622 100644 --- a/examples/terraform-aws-example/main.tf +++ b/examples/terraform-aws-example/main.tf @@ -17,7 +17,7 @@ terraform { resource "aws_instance" "example" { ami = data.aws_ami.ubuntu.id - instance_type = "t2.micro" + instance_type = var.instance_type tags = { Name = var.instance_name diff --git a/examples/terraform-aws-example/variables.tf b/examples/terraform-aws-example/variables.tf index af55641a2..f0f2c84b5 100644 --- a/examples/terraform-aws-example/variables.tf +++ b/examples/terraform-aws-example/variables.tf @@ -22,3 +22,8 @@ variable "instance_name" { default = "terratest-example" } +variable "instance_type" { + description = "The EC2 instance type to run." + type = string + default = "t2.micro" +} diff --git a/examples/terraform-aws-ssm-example/main.tf b/examples/terraform-aws-ssm-example/main.tf index 6f6637f24..e9217d793 100644 --- a/examples/terraform-aws-ssm-example/main.tf +++ b/examples/terraform-aws-ssm-example/main.tf @@ -66,7 +66,7 @@ data "aws_ami" "amazon_linux_2" { resource "aws_instance" "example" { ami = data.aws_ami.amazon_linux_2.id - instance_type = "t2.micro" + instance_type = var.instance_type associate_public_ip_address = true iam_instance_profile = aws_iam_instance_profile.example.name } diff --git a/examples/terraform-aws-ssm-example/variables.tf b/examples/terraform-aws-ssm-example/variables.tf index 69964826e..3681b4d83 100644 --- a/examples/terraform-aws-ssm-example/variables.tf +++ b/examples/terraform-aws-ssm-example/variables.tf @@ -21,3 +21,9 @@ variable "region" { description = "The AWS region to deploy into" default = "us-east-1" } + +variable "instance_type" { + description = "The EC2 instance type to run." + type = string + default = "t2.micro" +} \ No newline at end of file diff --git a/examples/terraform-http-example/main.tf b/examples/terraform-http-example/main.tf index bc27407c0..a0be8cfd0 100644 --- a/examples/terraform-http-example/main.tf +++ b/examples/terraform-http-example/main.tf @@ -25,7 +25,7 @@ provider "aws" { resource "aws_instance" "example" { ami = data.aws_ami.ubuntu.id - instance_type = "t2.micro" + instance_type = var.instance_type user_data = data.template_file.user_data.rendered vpc_security_group_ids = [aws_security_group.example.id] diff --git a/examples/terraform-http-example/variables.tf b/examples/terraform-http-example/variables.tf index 766ca6d11..f97b80e58 100644 --- a/examples/terraform-http-example/variables.tf +++ b/examples/terraform-http-example/variables.tf @@ -40,3 +40,8 @@ variable "instance_text" { default = "Hello, World!" } +variable "instance_type" { + description = "The EC2 instance type to run." + type = string + default = "t2.micro" +} diff --git a/examples/terraform-packer-example/main.tf b/examples/terraform-packer-example/main.tf index 812b30a51..87b65808c 100644 --- a/examples/terraform-packer-example/main.tf +++ b/examples/terraform-packer-example/main.tf @@ -25,7 +25,7 @@ provider "aws" { resource "aws_instance" "example" { ami = var.ami_id - instance_type = "t2.micro" + instance_type = var.instance_type user_data = data.template_file.user_data.rendered vpc_security_group_ids = [aws_security_group.example.id] diff --git a/examples/terraform-packer-example/variables.tf b/examples/terraform-packer-example/variables.tf index beaabffa1..cb1f3b96e 100644 --- a/examples/terraform-packer-example/variables.tf +++ b/examples/terraform-packer-example/variables.tf @@ -45,3 +45,8 @@ variable "instance_text" { default = "Hello, World!" } +variable "instance_type" { + description = "The EC2 instance type to run." + type = string + default = "t2.micro" +} diff --git a/examples/terraform-redeploy-example/main.tf b/examples/terraform-redeploy-example/main.tf index 38718b944..45f16b083 100644 --- a/examples/terraform-redeploy-example/main.tf +++ b/examples/terraform-redeploy-example/main.tf @@ -69,7 +69,7 @@ resource "aws_autoscaling_group" "web_servers" { resource "aws_launch_configuration" "web_servers" { image_id = data.aws_ami.ubuntu.id - instance_type = "t2.micro" + instance_type = var.instance_type security_groups = [aws_security_group.web_server.id] user_data = data.template_file.user_data.rendered key_name = var.key_pair_name diff --git a/examples/terraform-redeploy-example/variables.tf b/examples/terraform-redeploy-example/variables.tf index 17c5653ab..bdab607d8 100644 --- a/examples/terraform-redeploy-example/variables.tf +++ b/examples/terraform-redeploy-example/variables.tf @@ -58,3 +58,8 @@ variable "key_pair_name" { default = "" } +variable "instance_type" { + description = "The EC2 instance type to run." + type = string + default = "t2.micro" +} diff --git a/examples/terraform-ssh-example/main.tf b/examples/terraform-ssh-example/main.tf index 3c2c62cfc..2ab6a1fd3 100644 --- a/examples/terraform-ssh-example/main.tf +++ b/examples/terraform-ssh-example/main.tf @@ -25,7 +25,7 @@ provider "aws" { resource "aws_instance" "example_public" { ami = data.aws_ami.ubuntu.id - instance_type = "t2.micro" + instance_type = var.instance_type vpc_security_group_ids = [aws_security_group.example.id] key_name = var.key_pair_name @@ -43,7 +43,7 @@ resource "aws_instance" "example_public" { resource "aws_instance" "example_private" { ami = data.aws_ami.ubuntu.id - instance_type = "t2.micro" + instance_type = var.instance_type vpc_security_group_ids = [aws_security_group.example.id] key_name = var.key_pair_name diff --git a/examples/terraform-ssh-example/variables.tf b/examples/terraform-ssh-example/variables.tf index 89301bfd9..34f7e706c 100644 --- a/examples/terraform-ssh-example/variables.tf +++ b/examples/terraform-ssh-example/variables.tf @@ -39,3 +39,8 @@ variable "ssh_port" { default = 22 } +variable "instance_type" { + description = "The EC2 instance type to run." + type = string + default = "t2.micro" +} diff --git a/examples/terraform-ssh-password-example/main.tf b/examples/terraform-ssh-password-example/main.tf index 401e8df88..1220207f9 100644 --- a/examples/terraform-ssh-password-example/main.tf +++ b/examples/terraform-ssh-password-example/main.tf @@ -25,7 +25,7 @@ provider "aws" { resource "aws_instance" "example_public" { ami = data.aws_ami.ubuntu.id - instance_type = "t2.micro" + instance_type = var.instance_type user_data = data.template_file.user_data.rendered vpc_security_group_ids = [ diff --git a/examples/terraform-ssh-password-example/variables.tf b/examples/terraform-ssh-password-example/variables.tf index 203a2ff94..0a503cf17 100644 --- a/examples/terraform-ssh-password-example/variables.tf +++ b/examples/terraform-ssh-password-example/variables.tf @@ -39,3 +39,8 @@ variable "ssh_port" { default = 22 } +variable "instance_type" { + description = "The EC2 instance type to run." + type = string + default = "t2.micro" +} diff --git a/test/terraform_aws_example_plan_test.go b/test/terraform_aws_example_plan_test.go index b0e0feee1..1f7849f94 100644 --- a/test/terraform_aws_example_plan_test.go +++ b/test/terraform_aws_example_plan_test.go @@ -28,6 +28,9 @@ func TestTerraformAwsExamplePlan(t *testing.T) { // Pick a random AWS region to test in. This helps ensure your code works in all regions. awsRegion := aws.GetRandomStableRegion(t, nil, nil) + // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked + instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + // website::tag::1::Configure Terraform setting path to Terraform code, EC2 instance name, and AWS Region. We also // configure the options with default retryable errors to handle the most common retryable errors encountered in // terraform testing. @@ -39,6 +42,7 @@ func TestTerraformAwsExamplePlan(t *testing.T) { // Variables to pass to our Terraform code using -var options Vars: map[string]interface{}{ "instance_name": expectedName, + "instance_type": instanceType, }, // Environment variables to set when running Terraform diff --git a/test/terraform_aws_example_test.go b/test/terraform_aws_example_test.go index 00474bc2b..a94760039 100644 --- a/test/terraform_aws_example_test.go +++ b/test/terraform_aws_example_test.go @@ -26,6 +26,9 @@ func TestTerraformAwsExample(t *testing.T) { // Pick a random AWS region to test in. This helps ensure your code works in all regions. awsRegion := aws.GetRandomStableRegion(t, nil, nil) + // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked + instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + // website::tag::1::Configure Terraform setting path to Terraform code, EC2 instance name, and AWS Region. We also // configure the options with default retryable errors to handle the most common retryable errors encountered in // terraform testing. @@ -36,6 +39,7 @@ func TestTerraformAwsExample(t *testing.T) { // Variables to pass to our Terraform code using -var options Vars: map[string]interface{}{ "instance_name": expectedName, + "instance_type": instanceType, }, // Environment variables to set when running Terraform diff --git a/test/terraform_aws_ssm_example_test.go b/test/terraform_aws_ssm_example_test.go index 264eed79b..4d19ccbb5 100644 --- a/test/terraform_aws_ssm_example_test.go +++ b/test/terraform_aws_ssm_example_test.go @@ -13,10 +13,14 @@ func TestTerraformAwsSsmExample(t *testing.T) { t.Parallel() region := aws.GetRandomStableRegion(t, nil, nil) + // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked + instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ TerraformDir: "../examples/terraform-aws-ssm-example", Vars: map[string]interface{}{ - "region": region, + "region": region, + "instance_type": instanceType, }, }) defer terraform.Destroy(t, terraformOptions) diff --git a/test/terraform_http_example_test.go b/test/terraform_http_example_test.go index de7a980fc..2e7fd6fe2 100644 --- a/test/terraform_http_example_test.go +++ b/test/terraform_http_example_test.go @@ -30,6 +30,9 @@ func TestTerraformHttpExample(t *testing.T) { // Pick a random AWS region to test in. This helps ensure your code works in all regions. awsRegion := aws.GetRandomStableRegion(t, nil, nil) + // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked + instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + // Construct the terraform options with default retryable errors to handle the most common retryable errors in // terraform testing. terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ @@ -41,6 +44,7 @@ func TestTerraformHttpExample(t *testing.T) { "aws_region": awsRegion, "instance_name": instanceName, "instance_text": instanceText, + "instance_type": instanceType, }, }) diff --git a/test/terraform_packer_example_test.go b/test/terraform_packer_example_test.go index c3d50433f..ec82247db 100644 --- a/test/terraform_packer_example_test.go +++ b/test/terraform_packer_example_test.go @@ -119,6 +119,9 @@ func deployUsingTerraform(t *testing.T, awsRegion string, workingDir string) { // Specify the text the EC2 Instance will return when we make HTTP requests to it. instanceText := fmt.Sprintf("Hello, %s!", uniqueID) + // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked + instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + // Load the AMI ID saved by the earlier build_ami stage amiID := test_structure.LoadAmiId(t, workingDir) @@ -133,6 +136,7 @@ func deployUsingTerraform(t *testing.T, awsRegion string, workingDir string) { "aws_region": awsRegion, "instance_name": instanceName, "instance_text": instanceText, + "instance_type": instanceType, "ami_id": amiID, }, }) diff --git a/test/terraform_redeploy_example_test.go b/test/terraform_redeploy_example_test.go index 15cd4caec..01e6b4933 100644 --- a/test/terraform_redeploy_example_test.go +++ b/test/terraform_redeploy_example_test.go @@ -88,6 +88,9 @@ func initialDeploy(t *testing.T, awsRegion string, workingDir string) { // Specify the text the ASG will return when we make HTTP requests to it. text := fmt.Sprintf("Hello, %s!", uniqueID) + // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked + instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + // Construct the terraform options with default retryable errors to handle the most common retryable errors in // terraform testing. terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ @@ -99,6 +102,7 @@ func initialDeploy(t *testing.T, awsRegion string, workingDir string) { "aws_region": awsRegion, "instance_name": name, "instance_text": text, + "instance_type": instanceType, "key_pair_name": keyPair.Name, }, }) diff --git a/test/terraform_scp_example_test.go b/test/terraform_scp_example_test.go index 85deac51d..5bac6d156 100644 --- a/test/terraform_scp_example_test.go +++ b/test/terraform_scp_example_test.go @@ -82,6 +82,9 @@ func createTerraformOptions(t *testing.T, exampleFolder string) (*terraform.Opti // Pick a random AWS region to test in. This helps ensure your code works in all regions. awsRegion := aws.GetRandomStableRegion(t, nil, nil) + // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked + instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + // Create an EC2 KeyPair that we can use for SSH access keyPairName := fmt.Sprintf("terratest-asg-scp-example-%s", uniqueID) keyPair := aws.CreateAndImportEC2KeyPair(t, awsRegion, keyPairName) @@ -97,6 +100,7 @@ func createTerraformOptions(t *testing.T, exampleFolder string) (*terraform.Opti "aws_region": awsRegion, "instance_name": instanceName, "key_pair_name": keyPairName, + "instance_type": instanceType, }, }) diff --git a/test/terraform_ssh_example_test.go b/test/terraform_ssh_example_test.go index 312aa658f..02d139cbb 100644 --- a/test/terraform_ssh_example_test.go +++ b/test/terraform_ssh_example_test.go @@ -72,6 +72,9 @@ func configureTerraformOptions(t *testing.T, exampleFolder string) (*terraform.O // Pick a random AWS region to test in. This helps ensure your code works in all regions. awsRegion := aws.GetRandomStableRegion(t, nil, nil) + // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked + instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + // Create an EC2 KeyPair that we can use for SSH access keyPairName := fmt.Sprintf("terratest-ssh-example-%s", uniqueID) keyPair := aws.CreateAndImportEC2KeyPair(t, awsRegion, keyPairName) @@ -86,6 +89,7 @@ func configureTerraformOptions(t *testing.T, exampleFolder string) (*terraform.O Vars: map[string]interface{}{ "aws_region": awsRegion, "instance_name": instanceName, + "instance_type": instanceType, "key_pair_name": keyPairName, }, }) diff --git a/test/terraform_ssh_password_example_test.go b/test/terraform_ssh_password_example_test.go index 4c52ed4dd..e044b5c7e 100644 --- a/test/terraform_ssh_password_example_test.go +++ b/test/terraform_ssh_password_example_test.go @@ -60,6 +60,9 @@ func configureTerraformSshPasswordOptions(t *testing.T, exampleFolder string) *t // Pick a random AWS region to test in. This helps ensure your code works in all regions. awsRegion := aws.GetRandomStableRegion(t, nil, nil) + // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked + instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + // Create a random password that we can use for SSH access. password := random.UniqueId() @@ -73,6 +76,7 @@ func configureTerraformSshPasswordOptions(t *testing.T, exampleFolder string) *t Vars: map[string]interface{}{ "aws_region": awsRegion, "instance_name": instanceName, + "instance_type": instanceType, "terratest_password": password, }, }) From cdb010a4d454431c00512f4d626cef804246b45c Mon Sep 17 00:00:00 2001 From: Yevgeniy Brikman Date: Fri, 23 Apr 2021 11:35:36 +0100 Subject: [PATCH 5/5] Fix compile failure --- test/terraform_aws_ssm_example_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/terraform_aws_ssm_example_test.go b/test/terraform_aws_ssm_example_test.go index 4d19ccbb5..a2a01eaf1 100644 --- a/test/terraform_aws_ssm_example_test.go +++ b/test/terraform_aws_ssm_example_test.go @@ -14,7 +14,7 @@ func TestTerraformAwsSsmExample(t *testing.T) { region := aws.GetRandomStableRegion(t, nil, nil) // Some AWS regions are missing certain instance types, so pick an available type based on the region we picked - instanceType := aws.GetRecommendedInstanceType(t, awsRegion, []string{"t2.micro", "t3.micro"}) + instanceType := aws.GetRecommendedInstanceType(t, region, []string{"t2.micro", "t3.micro"}) terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{ TerraformDir: "../examples/terraform-aws-ssm-example",