Resource: aws_connect_phone_number

Provides an Amazon Connect Phone Number resource. For more information see Amazon Connect: Getting Started

Example Usage

Basic

resource "aws_connect_phone_number" "example" {
  target_arn   = aws_connect_instance.example.arn
  country_code = "US"
  type         = "DID"

  tags = {
    "hello" = "world"
  }
}

Description

resource "aws_connect_phone_number" "example" {
  target_arn   = aws_connect_instance.example.arn
  country_code = "US"
  type         = "DID"
  description  = "example description"
}

Prefix to filter phone numbers

resource "aws_connect_phone_number" "example" {
  target_arn   = aws_connect_instance.example.arn
  country_code = "US"
  type         = "DID"
  prefix       = "+18005"
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

status

The status configuration block supports the following attributes:

Timeouts

Configuration options:

Import

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