Skip to content

Commit

Permalink
Merge pull request #1836 from quixoticmonk/d-improve-awscc_connect_qu…
Browse files Browse the repository at this point in the history
…ick_connect

docs: added examples for awscc_connect_quick_connect
  • Loading branch information
marcosentino committed Jun 26, 2024
2 parents 08f2c6e + 16b1587 commit e7feec0
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 2 deletions.
46 changes: 44 additions & 2 deletions docs/resources/connect_quick_connect.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_connect_quick_connect Resource - terraform-provider-awscc"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,50 @@ description: |-

Resource Type definition for AWS::Connect::QuickConnect

## Example Usage

### Example with quick connect type of PHONE_NUMBER. The contact flow type should be CONTACT_FLOW.

```terraform
resource "awscc_connect_quick_connect" "example" {
instance_arn = awscc_connect_instance.example.arn
name = "example"
description = "example for phone connect type"
quick_connect_config = {
quick_connect_type = "PHONE_NUMBER"
phone_config = {
phone_number = "+12345678912"
}
}
tags = [{
key = "ModifiedBy"
value = "AWSCC"
}]
}
```

### Example with quick connect type of QUEUE. The contact flow type should be QUEUE_TRANSFER.

```terraform
resource "awscc_connect_quick_connect" "example" {
instance_arn = awscc_connect_instance.example.arn
name = "example"
description = "example for queue connect type"
quick_connect_config = {
quick_connect_type = "QUEUE"
queue_config = {
contact_flow_arn = awscc_connect_contact_flow.example.contact_flow_arn
queue_arn = awscc_connect_queue.example.queue_arn
}
}
tags = [{
key = "ModifiedBy"
value = "AWSCC"
}]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -86,4 +128,4 @@ Import is supported using the following syntax:

```shell
$ terraform import awscc_connect_quick_connect.example <resource ID>
```
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
resource "awscc_connect_quick_connect" "example" {
instance_arn = awscc_connect_instance.example.arn
name = "example"
description = "example for phone connect type"
quick_connect_config = {
quick_connect_type = "PHONE_NUMBER"
phone_config = {
phone_number = "+12345678912"
}
}

tags = [{
key = "ModifiedBy"
value = "AWSCC"
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
resource "awscc_connect_quick_connect" "example" {
instance_arn = awscc_connect_instance.example.arn
name = "example"
description = "example for queue connect type"
quick_connect_config = {
quick_connect_type = "QUEUE"
queue_config = {
contact_flow_arn = awscc_connect_contact_flow.example.contact_flow_arn
queue_arn = awscc_connect_queue.example.queue_arn
}
}

tags = [{
key = "ModifiedBy"
value = "AWSCC"
}]
}
31 changes: 31 additions & 0 deletions templates/resources/connect_quick_connect.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

## Example Usage

### Example with quick connect type of PHONE_NUMBER. The contact flow type should be CONTACT_FLOW.

{{ tffile (printf "examples/resources/%s/connect_quick_connect_phone.tf" .Name)}}

### Example with quick connect type of QUEUE. The contact flow type should be QUEUE_TRANSFER.

{{ tffile (printf "examples/resources/%s/connect_quick_connect_queue.tf" .Name)}}

{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}

{{- end }}

0 comments on commit e7feec0

Please sign in to comment.