Skip to content

Commit

Permalink
provider/aws: Added API Gateway Usage Plan (#12542)
Browse files Browse the repository at this point in the history
* Added api_gateway_usage_plan

* Updated documentation

* Fixed AWS usage plan review points
  • Loading branch information
Ninir authored and stack72 committed Mar 18, 2017
1 parent 2701586 commit 323f646
Show file tree
Hide file tree
Showing 9 changed files with 1,391 additions and 1 deletion.
30 changes: 30 additions & 0 deletions builtin/providers/aws/import_aws_api_gateway_usage_plan_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package aws

import (
"testing"

"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)

func TestAccAWSAPIGatewayUsagePlan_importBasic(t *testing.T) {
resourceName := "aws_api_gateway_usage_plan.main"
rName := acctest.RandString(10)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSApiGatewayUsagePlanBasicConfig(rName),
},

{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
1 change: 1 addition & 0 deletions builtin/providers/aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ func Provider() terraform.ResourceProvider {
"aws_api_gateway_model": resourceAwsApiGatewayModel(),
"aws_api_gateway_resource": resourceAwsApiGatewayResource(),
"aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(),
"aws_api_gateway_usage_plan": resourceAwsApiGatewayUsagePlan(),
"aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(),
"aws_appautoscaling_target": resourceAwsAppautoscalingTarget(),
"aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(),
Expand Down
Loading

0 comments on commit 323f646

Please sign in to comment.