You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
data"template_file""swagger_api" {
template="${file("${path.module}/swagger.yaml")}"
}
resource"aws_api_gateway_rest_api""reset_restapi" {
name="reset_restapi"description="Rest api based on swagger doc"body="${data.template_file.swagger_api.rendered}"
}
resource"aws_api_gateway_resource""pwreset_resource" {
rest_api_id="${aws_api_gateway_rest_api.pwreset_restapi.id}"parent_id="${aws_api_gateway_rest_api.pwreset_restapi.root_resource_id}"path_part="rh"
}
resource"aws_api_gateway_method""method" {
rest_api_id="${aws_api_gateway_rest_api.pwreset_restapi.id}"resource_id="${aws_api_gateway_resource.pwreset_resource.id}"http_method="PUT"authorization="NONE"
}
Debug Output
Error: Error applying plan:
1 error(s) occurred:
* module.pw_apigw.aws_api_gateway_resource.reset_resource: 1 error(s) occurred:
* aws_api_gateway_resource.reset_resource: Error creating API Gateway Resource: ConflictException: Another resource with the same parent already has this name: rh
status code: 409, request id: ee891e22-3458-11e8-a7df-ed925e0c2e87
Panic Output
N/A
Expected Behavior
I would have expected to see the /rh endpoint to be created as declared in swagger.
A follow up question would be that if we have to associate the same lambda function to all the endpoints, do I need to create seperate aws_api_gateway_method and aws_api_gateway_integration for each of the endpoints?
Actual Behavior
Got the error mentioned above. ConflictException: Another resource with the same parent already has this name: rh
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Terraform v0.11.4
Affected Resource(s)
aws_api_gateway_resource
aws_api_gateway_rest_api
template_file
Terraform Configuration Files
Debug Output
Panic Output
N/A
Expected Behavior
I would have expected to see the /rh endpoint to be created as declared in swagger.
A follow up question would be that if we have to associate the same lambda function to all the endpoints, do I need to create seperate aws_api_gateway_method and aws_api_gateway_integration for each of the endpoints?
Actual Behavior
Got the error mentioned above.
ConflictException: Another resource with the same parent already has this name: rh
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
The text was updated successfully, but these errors were encountered: