Skip to content

Commit

Permalink
Merge pull request #27734 from schuylr/f-connect_multi_party_conference
Browse files Browse the repository at this point in the history
Add multi_party_conference_enabled to aws_connect_instance
  • Loading branch information
ewbankkit authored Nov 11, 2022
2 parents 1ccdc82 + 7d296f7 commit 8f75bc4
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changelog/27734.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:enhancement
data-source/aws_connect_instance: Add `multi_party_conference_enabled` attribute
```

```release-note:enhancement
resource/aws_connect_instance: Add `multi_party_conference_enabled` argument
```
1 change: 1 addition & 0 deletions internal/service/connect/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func InstanceAttributeMapping() map[string]string {
connect.InstanceAttributeTypeContactLens: "contact_lens_enabled",
connect.InstanceAttributeTypeEarlyMedia: "early_media_enabled",
connect.InstanceAttributeTypeInboundCalls: "inbound_calls_enabled",
connect.InstanceAttributeTypeMultiPartyConference: "multi_party_conference_enabled",
connect.InstanceAttributeTypeOutboundCalls: "outbound_calls_enabled",
// Pre-release feature requiring allow-list from AWS. Removing all functionality until feature is GA
//connect.InstanceAttributeTypeUseCustomTtsVoices: "use_custom_tts_voices_enabled",
Expand Down
5 changes: 5 additions & 0 deletions internal/service/connect/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ func ResourceInstance() *schema.Resource {
validation.StringDoesNotMatch(regexp.MustCompile(`^(d-).+$`), "can not start with d-"),
),
},
"multi_party_conference_enabled": {
Type: schema.TypeBool,
Optional: true,
Default: false, //verified default result from ListInstanceAttributes()
},
"outbound_calls_enabled": {
Type: schema.TypeBool,
Required: true,
Expand Down
4 changes: 4 additions & 0 deletions internal/service/connect/instance_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func DataSourceInstance() *schema.Resource {
Computed: true,
ExactlyOneOf: []string{"instance_id", "instance_alias"},
},
"multi_party_conference_enabled": {
Type: schema.TypeBool,
Computed: true,
},
"outbound_calls_enabled": {
Type: schema.TypeBool,
Computed: true,
Expand Down
2 changes: 2 additions & 0 deletions internal/service/connect/instance_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func testAccInstanceDataSource_basic(t *testing.T) {
resource.TestCheckResourceAttrPair(resourceName, "contact_lens_enabled", dataSourceName, "contact_lens_enabled"),
resource.TestCheckResourceAttrPair(resourceName, "auto_resolve_best_voices_enabled", dataSourceName, "auto_resolve_best_voices_enabled"),
resource.TestCheckResourceAttrPair(resourceName, "early_media_enabled", dataSourceName, "early_media_enabled"),
resource.TestCheckResourceAttrPair(resourceName, "multi_party_conference_enabled", dataSourceName, "multi_party_conference_enabled"),
resource.TestCheckResourceAttrPair(resourceName, "status", dataSourceName, "status"),
resource.TestCheckResourceAttrPair(resourceName, "service_role", dataSourceName, "service_role"),
),
Expand All @@ -58,6 +59,7 @@ func testAccInstanceDataSource_basic(t *testing.T) {
resource.TestCheckResourceAttrPair(resourceName, "contact_lens_enabled", dataSourceName, "contact_lens_enabled"),
resource.TestCheckResourceAttrPair(resourceName, "auto_resolve_best_voices_enabled", dataSourceName, "auto_resolve_best_voices_enabled"),
resource.TestCheckResourceAttrPair(resourceName, "early_media_enabled", dataSourceName, "early_media_enabled"),
resource.TestCheckResourceAttrPair(resourceName, "multi_party_conference_enabled", dataSourceName, "multi_party_conference_enabled"),
resource.TestCheckResourceAttrPair(resourceName, "status", dataSourceName, "status"),
resource.TestCheckResourceAttrPair(resourceName, "service_role", dataSourceName, "service_role"),
),
Expand Down
3 changes: 3 additions & 0 deletions internal/service/connect/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func testAccInstance_basic(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "identity_management_type", connect.DirectoryTypeConnectManaged),
resource.TestCheckResourceAttr(resourceName, "inbound_calls_enabled", "true"),
resource.TestMatchResourceAttr(resourceName, "instance_alias", regexp.MustCompile(rName)),
resource.TestCheckResourceAttr(resourceName, "multi_party_conference_enabled", "false"),
resource.TestCheckResourceAttr(resourceName, "outbound_calls_enabled", "true"),
acctest.MatchResourceAttrGlobalARN(resourceName, "service_role", "iam", regexp.MustCompile(`role/aws-service-role/connect.amazonaws.com/.+`)),
resource.TestCheckResourceAttr(resourceName, "status", connect.InstanceStatusActive),
Expand All @@ -61,6 +62,7 @@ func testAccInstance_basic(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "early_media_enabled", "false"),
resource.TestCheckResourceAttr(resourceName, "inbound_calls_enabled", "false"),
resource.TestMatchResourceAttr(resourceName, "instance_alias", regexp.MustCompile(rName)),
resource.TestCheckResourceAttr(resourceName, "multi_party_conference_enabled", "false"),
resource.TestCheckResourceAttr(resourceName, "outbound_calls_enabled", "false"),
resource.TestCheckResourceAttr(resourceName, "status", connect.InstanceStatusActive),
),
Expand Down Expand Up @@ -207,6 +209,7 @@ resource "aws_connect_instance" "test" {
identity_management_type = "CONNECT_MANAGED"
inbound_calls_enabled = false
instance_alias = %[1]q
multi_party_conference_enabled = false
outbound_calls_enabled = false
}
`, rName)
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/connect_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ In addition to all arguments above, the following attributes are exported:
* `contact_flow_logs_enabled` - Whether contact flow logs are enabled.
* `contact_lens_enabled` - Whether contact lens is enabled.
* `auto_resolve_best_voices` - Whether auto resolve best voices is enabled.
* `multi_party_conference_enabled` - Whether multi-party calls/conference is enabled.
* `use_custom_tts_voices` - Whether use custom tts voices is enabled.
* `status` - State of the instance.
* `service_role` - Service role of the instance.
1 change: 1 addition & 0 deletions website/docs/r/connect_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The following arguments are supported:
* `identity_management_type` - (Required) Specifies the identity management type attached to the instance. Allowed Values are: `SAML`, `CONNECT_MANAGED`, `EXISTING_DIRECTORY`.
* `inbound_calls_enabled` - (Required) Specifies whether inbound calls are enabled.
* `instance_alias` - (Optional) Specifies the name of the instance. Required if `directory_id` not specified.
* `multi_party_conference_enabled` - (Optional) Specifies whether multi-party calls/conference is enabled. Defaults to `false`.
* `outbound_calls_enabled` - (Required) Specifies whether outbound calls are enabled.
<!-- * `use_custom_tts_voices` - (Optional) Whether use custom tts voices is enabled. Defaults to `false` -->

Expand Down

0 comments on commit 8f75bc4

Please sign in to comment.