providers/aws: basic route 53 zone import
This commit is contained in:
parent
f64f470807
commit
1c0a6bc6d3
|
@ -0,0 +1,28 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSRoute53Zone_importBasic(t *testing.T) {
|
||||
resourceName := "aws_route53_zone.main"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckRoute53ZoneDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccRoute53ZoneConfig,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
|
@ -21,6 +21,9 @@ func resourceAwsRoute53Zone() *schema.Resource {
|
|||
Read: resourceAwsRoute53ZoneRead,
|
||||
Update: resourceAwsRoute53ZoneUpdate,
|
||||
Delete: resourceAwsRoute53ZoneDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"name": &schema.Schema{
|
||||
|
|
Loading…
Reference in New Issue