From eb9cb462565f662be9679bb6146eecfda617f962 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 4 May 2016 11:24:45 -0700 Subject: [PATCH] providers/aws: enable aws_eip importing --- builtin/providers/aws/resource_aws_eip.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/builtin/providers/aws/resource_aws_eip.go b/builtin/providers/aws/resource_aws_eip.go index 65484dcb5..819c4a49f 100644 --- a/builtin/providers/aws/resource_aws_eip.go +++ b/builtin/providers/aws/resource_aws_eip.go @@ -19,6 +19,9 @@ func resourceAwsEip() *schema.Resource { Read: resourceAwsEipRead, Update: resourceAwsEipUpdate, Delete: resourceAwsEipDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsEipImportState, + }, Schema: map[string]*schema.Schema{ "vpc": &schema.Schema{ @@ -289,6 +292,12 @@ func resourceAwsEipDelete(d *schema.ResourceData, meta interface{}) error { }) } +func resourceAwsEipImportState( + d *schema.ResourceData, + meta interface{}) ([]*schema.ResourceData, error) { + return []*schema.ResourceData{d}, nil +} + func resourceAwsEipDomain(d *schema.ResourceData) string { if v, ok := d.GetOk("domain"); ok { return v.(string)