-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: custom resource #384
base: main
Are you sure you want to change the base?
Conversation
// This will need to be a ngrok URL when running locally | ||
// And then the API Gateway URL when deployed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In .env
export const serviceUrl = () => tryGetEnv<string>(ENV_NAMES.SERVICE_URL);
smsUrl: process.env.SERVER_URL, | ||
}); | ||
|
||
export const sms = api.post("/sms", (request) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is triggering this webhook? Is twillio asking for the SMS contents?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Twilio will call this when a message is received. It needs to return the response
// PROBLEM: attributes.sid won't exist during infer/synth | ||
// can use a Proxy to intercept these references, not sure if good idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you'd need to load the data into an env variable and then pull the values out via a proxy. And then we'd either need to always inject every custom resource value into all functions or compute a dependency map.
Or you could do runtime lookups on demand to a SSM parameter, app config, or secret.
This is a draft experiment of implementing a custom resource primitive for CRUD lifecycle events implemented directly in eventual