0.7.4
aws_api_gateway_method and related
resource "aws_api_gateway_method" "tf-demo-api-method" {
rest_api_id = "${aws_api_gateway_rest_api.tf-demo-api.id}"
resource_id = "${aws_api_gateway_resource.tf-demo-api-resource.id}"
http_method = "ANY"
authorization = "NONE"
}
N/A
AWS API Gateway service accepts the ANY method specifier when constructing a method on a resource, so terraform plan should as well.
terraform plan produces the following error:
There are warnings and/or errors related to your configuration. Please
fix these before continuing.
Errors:
* aws_api_gateway_method.tf-demo-api-method: "http_method" must be one of 'GET', 'HEAD', 'OPTIONS', 'PUT', 'POST', 'PATCH', 'DELETE'
This may be a result of the Terraform's strict adherence to the AWS Go SDK, but passing ANY is permitted in the Ruby SDK and via the AWS console.
This checks for validhttpmethod https://github.com/hashicorp/terraform/blob/master/builtin/providers/aws/validators.go#L344-L351 i don't thin go-aws-sdk have any validation on httpmethod.
@dayglojesus and @optimisticanshul hi there! Thank you for getting in touch about this.
Indeed, the ANY method was added recently, as per:
https://aws.amazon.com/blogs/aws/api-gateway-update-new-features-simplify-api-development/
I will fix it shortly for you.
@kwilczynski happy to send PR if this will be the fix..
@optimisticanshul one is coming already #9205. Sorry about the delay.
@kwilczynski Thanks for the amazing response! Let me know if you some testing.
This was released in Terraform 0.7.5 today
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.