I have dissected the Terraform AWS Api Gateway Resources documentation and I don't find a clear documentation around how I can create and attach an API Key as a Token Barer autorization to an API Gateway POST method with terraform
My CURL command would look something like this:
curl --location --request POST 'https://foobar123.execute-api.us-east-1.amazonaws.com/test' \
--header 'Authorization: Bearer AAABBBsKen4vcVDQVkZyu7lpEWGcs1o64bz7TCb1' \
--header 'Content-Type: text/plain' \
--data-raw '{"foo": "bar"}'
How do I achieve this with terraform?