In Terraform, how do you specify an API Gateway endpoint with a variable in the request path?
<p>In AWS API Gateway, I have a endpoint defined as <code>/users/{userId}/someAction</code>, and I'm trying to recreate this with terraform</p>

<p>I would start having some sort of linked gateway_resource chain like so...</p>

<pre class="lang-hcl prettyprint-override"><code>resource "aws_api_gateway_resource" "Users" {
  rest_api_id = "${var.rest_api_id}" 
  parent_id = "${var.parent_id}" 
  path_part = "users"
}

//{userId} here?

resource "aws_api_gateway_resource" "SomeAction" {
  rest_api_id = "${var.rest_api_id}" 
  parent_id = "${aws_api_gateway_resource.UserIdReference.id}"
  path_part = "someAction"
}
</code></pre>

<p>In which I then define the <code>aws_api_gateway_method</code> and everything else.</p>

<p>How do I define this endpoint in terraform?  The terraform documentation and examples don't cover this use case.</p>