Merge pull request #7288 from hashicorp/import-aws-redshiftsng
provider/aws: Support Import for `aws_redshift_subnet_group`
This commit is contained in:
commit
5043114d33
|
@ -0,0 +1,30 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSRedshiftSubnetGroup_importBasic(t *testing.T) {
|
||||
resourceName := "aws_redshift_subnet_group.foo"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckRedshiftSubnetGroupDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccRedshiftSubnetGroupConfig,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
ImportStateVerifyIgnore: []string{
|
||||
"description"},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
|
@ -19,6 +19,9 @@ func resourceAwsRedshiftSubnetGroup() *schema.Resource {
|
|||
Read: resourceAwsRedshiftSubnetGroupRead,
|
||||
Update: resourceAwsRedshiftSubnetGroupUpdate,
|
||||
Delete: resourceAwsRedshiftSubnetGroupDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"name": &schema.Schema{
|
||||
|
|
Loading…
Reference in New Issue