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.76k stars 9.12k forks source link

[New Service]: Support for AWS Textract & Custom Queries #34780

Open jeffbuswell opened 10 months ago

jeffbuswell commented 10 months ago

Description

Amazon Textract recently released the ability to create Custom Queries.

Having the ability to create these Adapters and Adapter Versions via Terraform would be very helpful.

Requested Resource(s) and/or Data Source(s)

Potential Terraform Configuration

# Adapted from https://docs.aws.amazon.com/textract/latest/dg/textract-create-adapter.html
resource "aws_textract_adapter" "demo_adapter" {
  adapter_name = "demo-adapter"
  feature_types = ["QUERIES"]
  description = "demo"
}

# Adapted from https://docs.aws.amazon.com/textract/latest/dg/textract-create-adapter-version.html
resource "aws_textract_adapter_version" "demo_adapter_version" {
  adapter_id = aws_textract_adapter.demo_adapter.id
  dataset_config = jsonencode({"ManifestS3Object": {"Bucket":"demo-bucket","Name":"demo/sample-manifest.jsonl"})
  output_config = jsonencode({"S3Bucket": "demo-output-bucket-name", "S3Prefix": "demo-prefix-string"})
}

References

Would you like to implement a fix?

None

github-actions[bot] commented 10 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

alexw23 commented 4 months ago

With the new custom queries this is no lesser of a resource than say S3. Whilst training etc might be out of scope, at least creating (and fetching) the adapter so that the ARN can be used in policies would be great.