Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
package-authoring
pulumi-ai
pulumi-cdk
pulumi-cloud
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by
Title
m
mammoth-account-65260
11/06/2019, 9:14 PM
Hi, how do I enable CORS on per method basis for AWS API gateway?
Similar to CDK
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.Resource.html#add-wbr-cors-wbr-preflightoptions
t
tall-librarian-49374
11/07/2019, 9:58 PM
I don't think there is a similar shortcut for this, so you'd essentially have to implement all the operations from
Converted somebody's terraform example:
https://gist.github.com/mikhailshilkov/192f54af6ba5fb83c2ead776cc73b3f9
https://medium.com/@MrPonath/terraform-and-aws-api-gateway-a137ee48a8ac
Or reverse-engineer
https://github.com/aws/aws-cdk/blob/012eeedb858ac8da22de698936f9ca09151c132c/packages/%40aws-cdk/aws-apigateway/lib/resource.ts#L182
m
mammoth-account-65260
11/07/2019, 10:45 PM
Thanks !
#typescript
Join Slack