diff --git a/builtin/providers/aws/import_aws_simpledb_domain_test.go b/builtin/providers/aws/import_aws_simpledb_domain_test.go new file mode 100644 index 000000000..d79de8925 --- /dev/null +++ b/builtin/providers/aws/import_aws_simpledb_domain_test.go @@ -0,0 +1,28 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSSimpleDBDomain_importBasic(t *testing.T) { + resourceName := "aws_simpledb_domain.test_domain" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSimpleDBDomainDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSSimpleDBDomainConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/builtin/providers/aws/resource_aws_simpledb_domain.go b/builtin/providers/aws/resource_aws_simpledb_domain.go index 645908c9b..8450342e3 100644 --- a/builtin/providers/aws/resource_aws_simpledb_domain.go +++ b/builtin/providers/aws/resource_aws_simpledb_domain.go @@ -16,6 +16,9 @@ func resourceAwsSimpleDBDomain() *schema.Resource { Create: resourceAwsSimpleDBDomainCreate, Read: resourceAwsSimpleDBDomainRead, Delete: resourceAwsSimpleDBDomainDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": &schema.Schema{