terraform/builtin/providers/aws/import_aws_api_gateway_key_...

29 lines
609 B
Go

package aws
import (
"testing"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAWSAPIGatewayApiKey_importBasic(t *testing.T) {
resourceName := "aws_api_gateway_api_key.test"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSAPIGatewayApiKeyDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSAPIGatewayApiKeyConfig,
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}