diff --git a/aws/data_source_aws_api_gateway_api_key_test.go b/aws/data_source_aws_api_gateway_api_key_test.go index 658190535a5..4bd140c62a7 100644 --- a/aws/data_source_aws_api_gateway_api_key_test.go +++ b/aws/data_source_aws_api_gateway_api_key_test.go @@ -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}" } diff --git a/website/docs/d/api_gateway_api_key.html.markdown b/website/docs/d/api_gateway_api_key.html.markdown index 254f04b1c96..ba8e17701ae 100644 --- a/website/docs/d/api_gateway_api_key.html.markdown +++ b/website/docs/d/api_gateway_api_key.html.markdown @@ -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