former2
former2 copied to clipboard
terraform output missing resources
While going through clean-up related matching absolute ids with references to resources, I discovered the output for terraform did not include a couple resources. The output had
resource "aws_api_gateway_usage_plan_key" "ApiGatewayUsagePlanKey" {
key_id = "7gjdytmbq9"
key_type = "API_KEY"
usage_plan_id = "oSIW8USqUwbSMO7VsZEz2Lea3nnPit37fc0ovzi5"
}
but did not have generated output for resources aws_api_gateway_usage_plan
and aws_api_gateway_api_key
.
Expected output should look something like
resource "aws_api_gateway_usage_plan" "ApiGetwayUsagePlan" {
name = "my-usage-plan-XXX"
api_stages {
api_id = aws_api_gateway_rest_api.ApiGatewayRestApi.id
stage = aws_api_gateway_stage.ApiGatewayStage.stage_name
}
}
resource "aws_api_gateway_api_key" "ApiGetwayApiKey" {
name = "my-api-key-YYY"
}
resource "aws_api_gateway_usage_plan_key" "ApiGatewayUsagePlanKey" {
key_id = aws_api_gateway_api_key.ApiGetwayApiKey.id
key_type = "API_KEY"
usage_plan_id = aws_api_gateway_usage_plan.ApiGetwayUsagePlan.id
}