From 704805ee958316173a3b67555da92b66019fe54f Mon Sep 17 00:00:00 2001 From: Pavel Platto Date: Wed, 14 Nov 2018 16:28:55 +0200 Subject: [PATCH] aws_gamelift_game_session_queue: import --- aws/resource_aws_gamelift_game_session_queue.go | 3 +++ aws/resource_aws_gamelift_game_session_queue_test.go | 5 +++++ website/docs/r/gamelift_game_session_queue.html.markdown | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_gamelift_game_session_queue.go b/aws/resource_aws_gamelift_game_session_queue.go index 21b8f280fa4..9cdfddbbce1 100644 --- a/aws/resource_aws_gamelift_game_session_queue.go +++ b/aws/resource_aws_gamelift_game_session_queue.go @@ -15,6 +15,9 @@ func resourceAwsGameliftGameSessionQueue() *schema.Resource { Read: resourceAwsGameliftGameSessionQueueRead, Update: resourceAwsGameliftGameSessionQueueUpdate, Delete: resourceAwsGameliftGameSessionQueueDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "destinations": { diff --git a/aws/resource_aws_gamelift_game_session_queue_test.go b/aws/resource_aws_gamelift_game_session_queue_test.go index 7edbc489154..dc4fb43bf14 100644 --- a/aws/resource_aws_gamelift_game_session_queue_test.go +++ b/aws/resource_aws_gamelift_game_session_queue_test.go @@ -170,6 +170,11 @@ func TestAccAWSGameliftGameSessionQueue_basic(t *testing.T) { "timeout_in_seconds", fmt.Sprintf("%d", uTimeoutInSeconds)), ), }, + { + ResourceName: "aws_gamelift_game_session_queue.test", + ImportState: true, + ImportStateVerify: true, + }, }, }) } diff --git a/website/docs/r/gamelift_game_session_queue.html.markdown b/website/docs/r/gamelift_game_session_queue.html.markdown index b471d8437e1..1e22b56189e 100644 --- a/website/docs/r/gamelift_game_session_queue.html.markdown +++ b/website/docs/r/gamelift_game_session_queue.html.markdown @@ -54,4 +54,8 @@ In addition to all arguments above, the following attributes are exported: ## Import -Gamelift Session Queues cannot be imported at this time. +Gamelift Game Session Queues can be imported by their `name`, e.g. + +``` +$ terraform import aws_gamelift_game_session_queue.example example +```