providers/aws: route53 delegation set import

This commit is contained in:
Mitchell Hashimoto 2016-05-18 13:26:52 -06:00
parent 801d342496
commit 4967f3ff08
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,28 @@
package aws
import (
"testing"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAWSRoute53DelegationSet_importBasic(t *testing.T) {
resourceName := "aws_route53_delegation_set.test"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccRoute53DelegationSetConfig,
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"reference_name"},
},
},
})
}

View File

@ -17,6 +17,9 @@ func resourceAwsRoute53DelegationSet() *schema.Resource {
Create: resourceAwsRoute53DelegationSetCreate, Create: resourceAwsRoute53DelegationSetCreate,
Read: resourceAwsRoute53DelegationSetRead, Read: resourceAwsRoute53DelegationSetRead,
Delete: resourceAwsRoute53DelegationSetDelete, Delete: resourceAwsRoute53DelegationSetDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Schema: map[string]*schema.Schema{ Schema: map[string]*schema.Schema{
"reference_name": &schema.Schema{ "reference_name": &schema.Schema{