provider/aws: Improve test for VPC-based Lambda func
This commit is contained in:
parent
9c236e7508
commit
3f188d5d1b
|
@ -6,6 +6,7 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
|
@ -51,6 +52,10 @@ func TestAccAWSLambdaFunction_VPC(t *testing.T) {
|
|||
testAccCheckAwsLambdaFunctionName(&conf, "example_lambda_name"),
|
||||
testAccCheckAwsLambdaFunctionArnHasSuffix(&conf, ":example_lambda_name"),
|
||||
testAccCheckAWSLambdaFunctionVersion(&conf, "$LATEST"),
|
||||
resource.TestCheckResourceAttr("aws_lambda_function.lambda_function_test", "vpc_config.#", "1"),
|
||||
resource.TestCheckResourceAttr("aws_lambda_function.lambda_function_test", "vpc_config.0.subnet_ids.#", "1"),
|
||||
resource.TestCheckResourceAttr("aws_lambda_function.lambda_function_test", "vpc_config.0.security_group_ids.#", "1"),
|
||||
resource.TestMatchResourceAttr("aws_lambda_function.lambda_function_test", "vpc_config.0.vpc_id", regexp.MustCompile("^vpc-")),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue