Provides an Amazon Connect Phone Number resource. For more information see Amazon Connect: Getting Started
resource "aws_connect_phone_number" "example" {
target_arn = aws_connect_instance.example.arn
country_code = "US"
type = "DID"
tags = {
"hello" = "world"
}
}
resource "aws_connect_phone_number" "example" {
target_arn = aws_connect_instance.example.arn
country_code = "US"
type = "DID"
description = "example description"
}
resource "aws_connect_phone_number" "example" {
target_arn = aws_connect_instance.example.arn
country_code = "US"
type = "DID"
prefix = "+18005"
}
This resource supports the following arguments:
country_code
- (Required, Forces new resource) The ISO country code. For a list of Valid values, refer to PhoneNumberCountryCode.description
- (Optional, Forces new resource) The description of the phone number.prefix
- (Optional, Forces new resource) The prefix of the phone number that is used to filter available phone numbers. If provided, it must contain +
as part of the country code. Do not specify this argument when importing the resource.tags
- (Optional) Tags to apply to the Phone Number. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.target_arn
- (Required) The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.type
- (Required, Forces new resource) The type of phone number. Valid Values: TOLL_FREE
| DID
.This resource exports the following attributes in addition to the arguments above:
arn
- The ARN of the phone number.phone_number
- The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code]
.id
- The identifier of the phone number.status
- A block that specifies status of the phone number. Documented below.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.status
The status
configuration block supports the following attributes:
message
- The status message.status
- The status of the phone number. Valid Values: CLAIMED
| IN_PROGRESS
| FAILED
.create
- (Default 2m
)update
- (Default 2m
)delete
- (Default 2m
)In Terraform v1.5.0 and later, use an import
block to import Amazon Connect Phone Numbers using its id
. For example:
import {
to = aws_connect_phone_number.example
id = "12345678-abcd-1234-efgh-9876543210ab"
}
Using terraform import
, import Amazon Connect Phone Numbers using its id
. For example:
% terraform import aws_connect_phone_number.example 12345678-abcd-1234-efgh-9876543210ab