From 8e107c89c123c83e79a86ca48e70076d1070654b Mon Sep 17 00:00:00 2001 From: Tyler Lynch Date: Fri, 3 Sep 2021 17:21:59 -0400 Subject: [PATCH] Removed us_voices and finshed stacking AccTests --- aws/data_source_aws_connect_instance.go | 10 +++++----- aws/data_source_aws_connect_instance_test.go | 19 +++++-------------- aws/resource_aws_connect_instance.go | 2 +- aws/resource_aws_connect_instance_test.go | 7 ++++--- website/docs/r/connect_instance.html.markdown | 2 +- 5 files changed, 16 insertions(+), 24 deletions(-) diff --git a/aws/data_source_aws_connect_instance.go b/aws/data_source_aws_connect_instance.go index 6610a38a122..bdc62c21323 100644 --- a/aws/data_source_aws_connect_instance.go +++ b/aws/data_source_aws_connect_instance.go @@ -73,10 +73,10 @@ func dataSourceAwsConnectInstance() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "use_custom_tts_voices_enabled": { - Type: schema.TypeBool, - Computed: true, - }, + // "use_custom_tts_voices_enabled": { + // Type: schema.TypeBool, + // Computed: true, + // }, }, } } @@ -165,7 +165,7 @@ func dataSourceAwsConnectGetAllConnectInstanceSummaries(ctx context.Context, con for { input := &connect.ListInstancesInput{ - MaxResults: aws.Int64(int64(tfconnect.ListInstancesMaxResults)), + MaxResults: aws.Int64(tfconnect.ListInstancesMaxResults), } if nextToken != "" { input.NextToken = aws.String(nextToken) diff --git a/aws/data_source_aws_connect_instance_test.go b/aws/data_source_aws_connect_instance_test.go index 3991a5a32e8..cdb63ce5901 100644 --- a/aws/data_source_aws_connect_instance_test.go +++ b/aws/data_source_aws_connect_instance_test.go @@ -38,24 +38,16 @@ func TestAccAwsConnectInstanceDataSource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "contact_flow_logs_enabled"), resource.TestCheckResourceAttrSet(resourceName, "contact_lens_enabled"), resource.TestCheckResourceAttrSet(resourceName, "auto_resolve_best_voices_enabled"), - resource.TestCheckResourceAttrSet(resourceName, "use_custom_tts_voices_enabled"), resource.TestCheckResourceAttrSet(resourceName, "early_media_enabled"), resource.TestCheckResourceAttrSet(resourceName, "status"), resource.TestCheckResourceAttrSet(resourceName, "service_role"), ), }, - }, - }) -} - -func TestAccAwsConnectInstanceDataSource_alias(t *testing.T) { - rName := acctest.RandomWithPrefix("datasource-test-terraform") - resourceName := "aws_connect_instance.test" - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - ErrorCheck: testAccErrorCheck(t, connect.EndpointsID), - Providers: testAccProviders, - Steps: []resource.TestStep{ + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccAwsConnectInstanceDataSourceConfigAlias(rName), Check: resource.ComposeAggregateTestCheckFunc( @@ -68,7 +60,6 @@ func TestAccAwsConnectInstanceDataSource_alias(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "contact_flow_logs_enabled"), resource.TestCheckResourceAttrSet(resourceName, "contact_lens_enabled"), resource.TestCheckResourceAttrSet(resourceName, "auto_resolve_best_voices_enabled"), - resource.TestCheckResourceAttrSet(resourceName, "use_custom_tts_voices_enabled"), resource.TestCheckResourceAttrSet(resourceName, "early_media_enabled"), resource.TestCheckResourceAttrSet(resourceName, "status"), resource.TestCheckResourceAttrSet(resourceName, "service_role"), diff --git a/aws/resource_aws_connect_instance.go b/aws/resource_aws_connect_instance.go index 82c067eb5d3..e3c66d793d4 100644 --- a/aws/resource_aws_connect_instance.go +++ b/aws/resource_aws_connect_instance.go @@ -130,7 +130,7 @@ func resourceAwsConnectInstanceCreate(ctx context.Context, d *schema.ResourceDat output, err := conn.CreateInstanceWithContext(ctx, input) if err != nil { - return diag.FromErr(fmt.Errorf("error reading Connect Instance (%s): %s", d.Id(), err)) + return diag.FromErr(fmt.Errorf("error creating Connect Instance (%s): %s", d.Id(), err)) } d.SetId(aws.StringValue(output.Id)) diff --git a/aws/resource_aws_connect_instance_test.go b/aws/resource_aws_connect_instance_test.go index 318141db8a4..82f04c28b1c 100644 --- a/aws/resource_aws_connect_instance_test.go +++ b/aws/resource_aws_connect_instance_test.go @@ -246,13 +246,14 @@ resource "aws_connect_instance" "test" { func testAccAwsConnectInstanceConfigBasicFlipped(rName string) string { return fmt.Sprintf(` resource "aws_connect_instance" "test" { + auto_resolve_best_voices_enabled = false + contact_flow_logs_enabled = true + contact_lens_enabled = false + early_media_enabled = false identity_management_type = "CONNECT_MANAGED" inbound_calls_enabled = false instance_alias = %[1]q outbound_calls_enabled = false - auto_resolve_best_voices_enabled = false - contact_flow_logs_enabled = true - early_media_enabled = false } `, rName) } diff --git a/website/docs/r/connect_instance.html.markdown b/website/docs/r/connect_instance.html.markdown index 3336e415c0a..c57fad9e3d3 100644 --- a/website/docs/r/connect_instance.html.markdown +++ b/website/docs/r/connect_instance.html.markdown @@ -36,7 +36,7 @@ The following arguments are supported: * `contact_flow_logs_enabled` - (Optional) Specifies Whether contact flow logs are enabled. Defaults to `false` * `contact_lens_enabled` - (Optional) Specifies Whether contact lens is enabled. Defaults to `true` * `auto_resolve_best_voices` - (Optional) Specifies Whether auto resolve best voices is enabled. Defaults to `true` -* `use_custom_tts_voices` - (Optional) Specifies Whether use custom tts voices is enabled. Defaults to `false` + ### Timeouts