hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.7k stars 9.07k forks source link

no aws_api_gateway_method data source #26204

Open erikj23 opened 2 years ago

erikj23 commented 2 years ago

Community Note

Description

It seems to me that there should be a data source for api gateway methods.

New or Affected Resource(s)

Potential Terraform Configuration

data "aws_api_gateway_resource" "this" {
  rest_api_id = "2defgu0hck"
  path        = "/path/to/resource"
}

# fetches the api method
data "aws_api_gateway_method" "this" {
  rest_api_id   = "2defgu0hck"
  resource_id   = data.aws_api_gateway_resource.this.id
  http_method   = "GET"
}

References

dbanks15 commented 2 months ago

This would also be useful for me for the same reason mentioned in https://github.com/hashicorp/terraform-provider-aws/issues/26381