Skip to content

Commit

Permalink
Add Tag Support to API Gateway Usage Plan Resource (#10566)
Browse files Browse the repository at this point in the history
Output from acceptance testing:

```
--- PASS: TestAccAWSAPIGatewayUsagePlan_throttlingInitialRateLimit (42.37s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_basic (129.58s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_productCode (307.70s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_apiStages (342.27s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_description (371.72s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_throttling (400.19s)
--- PASS: TestAccAWSAPIGatewayUsagePlan_quota (500.22s)
```
  • Loading branch information
DrFaust92 authored and bflad committed Nov 8, 2019
1 parent d26c499 commit 50d66de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_usage_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func resourceAwsApiGatewayUsagePlanRead(d *schema.ResourceData, meta interface{}
UsagePlanId: aws.String(d.Id()),
})
if err != nil {
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" {
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == apigateway.ErrCodeNotFoundException {
log.Printf("[WARN] API Gateway Usage Plan (%s) not found, removing from state", d.Id())
d.SetId("")
return nil
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_api_gateway_usage_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ func testAccCheckAWSAPIGatewayUsagePlanDestroy(s *terraform.State) error {
if !ok {
return err
}
if aws2err.Code() != "NotFoundException" {
if aws2err.Code() != apigateway.ErrCodeNotFoundException {
return err
}

Expand Down

2 comments on commit 50d66de

@DrFaust92
Copy link
Collaborator Author

@DrFaust92 DrFaust92 commented on 50d66de Dec 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this seems to be the issue #11146 is based on @bflad @zihaoyu

@bflad
Copy link
Contributor

@bflad bflad commented on 50d66de Dec 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this is a little odd/terrifying... this squashed commit of #10566 was created via Squash and Merge on the GitHub UI.

Please sign in to comment.