diff --git a/builtin/providers/aws/import_aws_flow_log_test.go b/builtin/providers/aws/import_aws_flow_log_test.go index 5bc6793fb..97ccebb68 100644 --- a/builtin/providers/aws/import_aws_flow_log_test.go +++ b/builtin/providers/aws/import_aws_flow_log_test.go @@ -1,7 +1,6 @@ package aws import ( - "fmt" "testing" "github.com/hashicorp/terraform/helper/acctest" @@ -11,7 +10,7 @@ import ( func TestAccAWSFlowLog_importBasic(t *testing.T) { resourceName := "aws_flow_log.test_flow_log" - fln := fmt.Sprintf("tf-test-fl-%d", acctest.RandInt()) + rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -19,7 +18,7 @@ func TestAccAWSFlowLog_importBasic(t *testing.T) { CheckDestroy: testAccCheckFlowLogDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccFlowLogConfig_basic(fln), + Config: testAccFlowLogConfig_basic(rInt), }, resource.TestStep{ diff --git a/builtin/providers/aws/resource_aws_flow_log_test.go b/builtin/providers/aws/resource_aws_flow_log_test.go index af842ca6c..8757caea1 100644 --- a/builtin/providers/aws/resource_aws_flow_log_test.go +++ b/builtin/providers/aws/resource_aws_flow_log_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSFlowLog_basic(t *testing.T) { var flowLog ec2.FlowLog - fln := fmt.Sprintf("tf-test-fl-%d", acctest.RandInt()) + rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -23,7 +23,7 @@ func TestAccAWSFlowLog_basic(t *testing.T) { CheckDestroy: testAccCheckFlowLogDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccFlowLogConfig_basic(fln), + Config: testAccFlowLogConfig_basic(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckFlowLogExists("aws_flow_log.test_flow_log", &flowLog), testAccCheckAWSFlowLogAttributes(&flowLog), @@ -36,7 +36,7 @@ func TestAccAWSFlowLog_basic(t *testing.T) { func TestAccAWSFlowLog_subnet(t *testing.T) { var flowLog ec2.FlowLog - fln := fmt.Sprintf("tf-test-fl-%d", acctest.RandInt()) + rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -45,7 +45,7 @@ func TestAccAWSFlowLog_subnet(t *testing.T) { CheckDestroy: testAccCheckFlowLogDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccFlowLogConfig_subnet(fln), + Config: testAccFlowLogConfig_subnet(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckFlowLogExists("aws_flow_log.test_flow_log_subnet", &flowLog), testAccCheckAWSFlowLogAttributes(&flowLog), @@ -108,7 +108,7 @@ func testAccCheckFlowLogDestroy(s *terraform.State) error { return nil } -func testAccFlowLogConfig_basic(fln string) string { +func testAccFlowLogConfig_basic(rInt int) string { return fmt.Sprintf(` resource "aws_vpc" "default" { cidr_block = "10.0.0.0/16" @@ -127,7 +127,7 @@ resource "aws_subnet" "test_subnet" { } resource "aws_iam_role" "test_role" { - name = "test_role" + name = "tf_test_flow_log_basic_%d" assume_role_policy = <