Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r/aws_connect_instance - add new resource #16709

Merged
merged 22 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dbb01ed
Feature: AWSConnectInstance Resource
abebars Dec 16, 2020
6ef35c5
Code review
abebars Feb 28, 2021
bc1cd06
Code review
abebars Feb 28, 2021
1d8b346
Fix regex
abebars Feb 28, 2021
0b686fc
Add Error Check
abebars Apr 23, 2021
c5f5209
Format changes `make fmt`
AdamTylerLynch Jul 22, 2021
6e5c378
Refactoring Connect Instance
AdamTylerLynch Jul 31, 2021
313bd21
WIP - refactoring. Need to add Create/Delete wait checks and fix AccT…
AdamTylerLynch Jul 31, 2021
1254465
WIP refactored to match default API values, AccTest_Basic working.
AdamTylerLynch Aug 4, 2021
f2d1256
fix data source acc tests
drewmullen Aug 5, 2021
be0647a
acc test for all attrs
drewmullen Aug 5, 2021
1e93156
Removed use_custom_tts_voices_enabled as it's a pre-release feature a…
AdamTylerLynch Sep 1, 2021
5865150
Combining AccTests to save resources. Fixed Formatting.
AdamTylerLynch Sep 2, 2021
8e107c8
Removed us_voices and finshed stacking AccTests
AdamTylerLynch Sep 3, 2021
b011e48
fixed spacing for linting
AdamTylerLynch Sep 3, 2021
406c9e8
Updated documentation, exposed Timeouts.
AdamTylerLynch Sep 17, 2021
d4f3b00
Fixing linting issues in Connect docs.
AdamTylerLynch Sep 17, 2021
f71a97d
Fixed hcl -> terraform
AdamTylerLynch Sep 17, 2021
4400987
Added Amazon Connect Instance changelog
AdamTylerLynch Sep 20, 2021
c313e27
add plan-time requirement for exactly-on-of argument; use pagination …
anGie44 Sep 23, 2021
08b6773
CR updates; serialize tests since max of 2 can be run in parallel
anGie44 Sep 23, 2021
823d1a7
update data source test to compare attributes with respective resource
anGie44 Sep 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed us_voices and finshed stacking AccTests
  • Loading branch information
AdamTylerLynch authored and anGie44 committed Sep 22, 2021
commit 8e107c89c123c83e79a86ca48e70076d1070654b
10 changes: 5 additions & 5 deletions aws/data_source_aws_connect_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
// },
},
}
}
Expand Down Expand Up @@ -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)
Expand Down
19 changes: 5 additions & 14 deletions aws/data_source_aws_connect_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_connect_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
7 changes: 4 additions & 3 deletions aws/resource_aws_connect_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/connect_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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`
<!-- * `use_custom_tts_voices` - (Optional) Specifies Whether use custom tts voices is enabled. Defaults to `false` -->

### Timeouts

Expand Down