Skip to content

Commit

Permalink
Review comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
gthole committed Nov 14, 2018
1 parent 0d93e34 commit 520ab35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 47 deletions.
45 changes: 0 additions & 45 deletions aws/data_source_aws_api_gateway_api_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,55 +31,10 @@ func TestAccDataSourceAwsApiGatewayApiKey(t *testing.T) {

func testAccDataSourceAwsApiGatewayApiKeyConfig(r string) string {
return fmt.Sprintf(`
resource "aws_api_gateway_rest_api" "example" {
name = "example"
}
resource "aws_api_gateway_resource" "example_v1" {
rest_api_id = "${aws_api_gateway_rest_api.example.id}"
parent_id = "${aws_api_gateway_rest_api.example.root_resource_id}"
path_part = "v1"
}
resource "aws_api_gateway_method" "example_v1_method" {
rest_api_id = "${aws_api_gateway_rest_api.example.id}"
resource_id = "${aws_api_gateway_resource.example_v1.id}"
http_method = "GET"
authorization = "NONE"
}
resource "aws_api_gateway_integration" "example_v1_integration" {
rest_api_id = "${aws_api_gateway_rest_api.example.id}"
resource_id = "${aws_api_gateway_resource.example_v1.id}"
http_method = "${aws_api_gateway_method.example_v1_method.http_method}"
type = "MOCK"
}
resource "aws_api_gateway_deployment" "example_deployment" {
rest_api_id = "${aws_api_gateway_rest_api.example.id}"
stage_name = "example"
depends_on = ["aws_api_gateway_resource.example_v1", "aws_api_gateway_method.example_v1_method", "aws_api_gateway_integration.example_v1_integration"]
}
resource "aws_api_gateway_api_key" "example_key" {
name = "%s"
}
resource "aws_api_gateway_usage_plan" "example_plan" {
name = "example"
api_stages {
api_id = "${aws_api_gateway_rest_api.example.id}"
stage = "${aws_api_gateway_deployment.example_deployment.stage_name}"
}
}
resource "aws_api_gateway_usage_plan_key" "plan_key" {
key_id = "${aws_api_gateway_api_key.example_key.id}"
key_type = "API_KEY"
usage_plan_id = "${aws_api_gateway_usage_plan.example_plan.id}"
}
data "aws_api_gateway_api_key" "test_key" {
id = "${aws_api_gateway_api_key.example_key.id}"
}
Expand Down
4 changes: 2 additions & 2 deletions website/docs/d/api_gateway_api_key.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ example to supply credentials for a dependency microservice.

```hcl
data "aws_api_gateway_api_key" "my_api_key" {
id = "my-rest-api-key"
id = "ru3mpjgse6"
}
```

## Argument Reference

* `id` - (Required) The ID of the API Key to look up. If no API Key is found with this name, an error will be returned.
* `id` - (Required) The ID of the API Key to look up.

## Attributes Reference

Expand Down

0 comments on commit 520ab35

Please sign in to comment.