Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/aws: Added Usage Plan Key resource #12851

Merged
merged 2 commits into from
Mar 20, 2017

Conversation

Ninir
Copy link
Contributor

@Ninir Ninir commented Mar 18, 2017

Description

This adds the API Gateway usage plan key, based on the following API: https://docs.aws.amazon.com/apigateway/api-reference/link-relation/usageplankey-create/

Related issues

Follow up of #12542
Might resolve other issues too.

Tests

$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayUsagePlanKey_'     
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/18 19:30:46 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAPIGatewayUsagePlanKey_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayUsagePlanKey_importBasic
--- PASS: TestAccAWSAPIGatewayUsagePlanKey_importBasic (25.35s)
=== RUN   TestAccAWSAPIGatewayUsagePlanKey_basic
--- PASS: TestAccAWSAPIGatewayUsagePlanKey_basic (123.42s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	148.800s

TODOs

  • Add the API Gateway Usage Plan Key resource
  • Add validation
  • Add the documentation
  • Add test cases
  • Add import tests
  • Compile & test

@Ninir
Copy link
Contributor Author

Ninir commented Mar 20, 2017

All ok on from my point of view :)

$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayUsagePlanKey_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/20 11:22:27 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAPIGatewayUsagePlanKey_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayUsagePlanKey_importBasic
--- PASS: TestAccAWSAPIGatewayUsagePlanKey_importBasic (34.99s)
=== RUN   TestAccAWSAPIGatewayUsagePlanKey_basic
--- PASS: TestAccAWSAPIGatewayUsagePlanKey_basic (179.37s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	214.389s

@Ninir Ninir force-pushed the f-aws-apigw-usageplan-apikey branch from bbbdb39 to eac7b15 Compare March 20, 2017 10:28
Copy link
Contributor

@stack72 stack72 left a comment

Choose a reason for hiding this comment

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

Hi @Ninir

The work looks good - I am questioning the import though. The Read func takes 2 parameters - the ImportPassThrough only has support for the Id - how does the import work?

Paul

@stack72 stack72 self-assigned this Mar 20, 2017
@Ninir
Copy link
Contributor Author

Ninir commented Mar 20, 2017

@stack72 Hi Paul,

You're 100% right. Due a typo on my side, the import was working for... usage plan, not usage plan keys.
As the import command only takes two parameters as far as I know, i.e. the resource type & resource name, there are no possibilities to handle such import I guess.

Removing that part.

@Ninir Ninir force-pushed the f-aws-apigw-usageplan-apikey branch from eac7b15 to 2aa80b8 Compare March 20, 2017 13:37
@stack72
Copy link
Contributor

stack72 commented Mar 20, 2017

In that case, we look good here! thanks for the work

% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayUsagePlanKey_'       ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/20 13:50:03 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAPIGatewayUsagePlanKey_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayUsagePlanKey_basic
--- PASS: TestAccAWSAPIGatewayUsagePlanKey_basic (155.47s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	155.496s

Paul

@stack72 stack72 merged commit ae2c7a5 into hashicorp:master Mar 20, 2017
@Ninir Ninir deleted the f-aws-apigw-usageplan-apikey branch March 20, 2017 13:54
@Ninir
Copy link
Contributor Author

Ninir commented Mar 20, 2017

Thanks for the quick review Paul, as always. 👍

@stack72
Copy link
Contributor

stack72 commented Mar 20, 2017

you make these thing easy to review @Ninir :) you always use clear PR descriptions and it's usually the questions we need to ask

mbfrahry pushed a commit that referenced this pull request Mar 28, 2017
* provider/aws: Added Usage Plan Key resource

* provider/aws: Added usage plan import documentation
@ghost
Copy link

ghost commented Apr 15, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants