func Test3NicExample(t *testing.T) {
	opts := &terraform.Options{
		TerraformDir: "../examples/3_nic_with_new_vpc",
		Vars: map[string]interface{} {
			"ec2_key_name": os.Getenv("ec2_key_name"),
		},
	}
	defer terraform.Destroy(t, opts)
	terraform.InitAndApply(t, opts)
	bigipMgmtDNS := terraform.OutputList(t, opts, "bigip_mgmt_dns")
	bigipMgmtPort := terraform.OutputRequired(t, opts, "bigip_mgmt_port")
	awsSecretmanagerSecretName := terraform.OutputRequired(t, opts, "aws_secretmanager_secret_name")
	bigipPwd, err := getSecret3(awsSecretmanagerSecretName, os.Getenv("AWS_DEFAULT_REGION")) 
	if err != nil || bigipPwd == "" {
		t.Errorf("CAN NOT OBTAIN BIG-IP PASSWORD FROM SECRET MANAGER")
	}
	fmt.Println("Sleeping for 5 minutes so A&O Toolchain can be installed")
	time.Sleep(300 * time.Second)
	const minRetryTime = 1    
	const maxRetryTime = 120  
	const maxRetryCount = 5
	const attemptTimeoutInit = 2  
	const doInfoURL = "/mgmt/shared/declarative-onboarding/info"
	const as3InfoURL = "/mgmt/shared/appsvcs/info"
	tr := &http.Transport{
		TLSClientConfig: &tls.Config {
			InsecureSkipVerify: true,
		},
	}
	client := &http.Client{
		Transport: tr,
	}
	rclient := &retryablehttp.Client{
		HTTPClient: client,
		RetryWaitMin: minRetryTime * time.Second,
		RetryWaitMax: maxRetryTime * time.Second,
		RetryMax: maxRetryCount,
		Backoff: retryablehttp.DefaultBackoff,
	}
	rclient.CheckRetry = func (_ context.Context, resp *http.Response, err error) (bool, error) {
		if err != nil {
			return true, err
		}
		if resp.StatusCode == 0 || resp.StatusCode >= 400 {
			fmt.Println(resp.StatusCode)
			return true, nil
		}
		return false, nil
	}
	for _, bigip := range bigipMgmtDNS {
		fmt.Printf("CHECK DO FOR %s\n", bigip)
		DOurl := fmt.Sprintf("https://%s:%s%s", bigip, bigipMgmtPort, doInfoURL)
		doresp, err := testAnOToolchain3(DOurl, bigipPwd, rclient)
		if err != nil {
			t.Errorf("DO REQUEST FAILED")
		}
		fmt.Println(doresp)
		fmt.Printf("CHECK AS3 FOR %s\n", bigip)
		AS3url := fmt.Sprintf("https://%s:%s%s", bigip, bigipMgmtPort, as3InfoURL)
		as3resp, err := testAnOToolchain3(AS3url, bigipPwd, rclient)
		if err != nil {
			t.Errorf("DO REQUEST FAILED")
		}
		fmt.Println(as3resp)
	}
}
Test the BIG-IP 1 NIC example
Ensure your AWS credentials are set to the following environment vars:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
Ensure you have defined the default AWS region in the following environment var:
AWS_DEFAULT_REGION
package test
import (
	"context"
	"errors"
	"encoding/base64"
	"fmt"
	"testing"
	"net/http"
	"crypto/tls"
	"time"
	"os"
	"github.com/hashicorp/go-retryablehttp"
	"github.com/gruntwork-io/terratest/modules/terraform"
	"github.com/aws/aws-sdk-go/service/secretsmanager"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/session"
)
func getSecret3(secretName string, region string) (password string, err error) {
	sess:= session.Must(session.NewSession(&aws.Config{
		Region : aws.String(region),
	}))
	svc := secretsmanager.New(sess)
	input := &secretsmanager.GetSecretValueInput{
		SecretId:     aws.String(secretName),
		VersionStage: aws.String("AWSCURRENT"),  
	}
	result, err := svc.GetSecretValue(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
				case secretsmanager.ErrCodeDecryptionFailure:
				fmt.Println(secretsmanager.ErrCodeDecryptionFailure, aerr.Error())
				case secretsmanager.ErrCodeInternalServiceError:
				fmt.Println(secretsmanager.ErrCodeInternalServiceError, aerr.Error())
				case secretsmanager.ErrCodeInvalidParameterException:
				fmt.Println(secretsmanager.ErrCodeInvalidParameterException, aerr.Error())
				case secretsmanager.ErrCodeInvalidRequestException:
				fmt.Println(secretsmanager.ErrCodeInvalidRequestException, aerr.Error())
				case secretsmanager.ErrCodeResourceNotFoundException:
				fmt.Println(secretsmanager.ErrCodeResourceNotFoundException, aerr.Error())
			}
		} else {
			fmt.Println(err.Error())
		}
		return "", err
	}
	var secretString, decodedBinarySecret string
	if result.SecretString != nil {
		secretString = *result.SecretString
		return secretString, nil
	} else {
		decodedBinarySecretBytes := make([]byte, base64.StdEncoding.DecodedLen(len(result.SecretBinary)))
		len, err := base64.StdEncoding.Decode(decodedBinarySecretBytes, result.SecretBinary)
		if err != nil {
			fmt.Println("Base64 Decode Error:", err)
			return "", err
		}
		decodedBinarySecret = string(decodedBinarySecretBytes[:len])
		return decodedBinarySecret, nil
	}
}
func testAnOToolchain3(url string, pwd string, client *retryablehttp.Client) (int, error) {
	req, err := retryablehttp.NewRequest("GET", url, nil)
	req.SetBasicAuth("admin", pwd)
	resp, err := client.Do(req)
	if err != nil || resp.StatusCode != 200 {
		return 0,  errors.New("Request Failed")
	}
	defer resp.Body.Close()
	return resp.StatusCode, nil
}