upstash / docs

Upstash documentation
https://upstash.com/docs/
9 stars 46 forks source link

why not use pulumi for the ion example? #212

Open ryanleecode opened 4 months ago

ryanleecode commented 4 months ago

https://upstash.com/docs/redis/quickstarts/ion

import * as upstash from '@upstash/pulumi'

const upstashProvider = new upstash.Provider(
  'Upstash',
  {
    apiKey: process.env.UPSTASH_API_KEY,
    email: process.env.UPSTASH_EMAIL,
  },
  { parent: this },
)

sst.linkable(upstash.RedisDatabase, (redis) => ({
  properties: {
    endpoint: redis.endpoint,
    restToken: redis.restToken,
  },
}))

const redis = new upstash.RedisDatabase(
  'Redis',
  {
    region: 'us-east-1',
    databaseName: $interpolate`my-app-${$app.stage}-redis`,
    eviction: true,
    tls: true,
  },
  { provider: upstashProvider, parent: this },
)

new sst.aws.Nextjs('Web', {
    link: [redis],
})
buggyhunter commented 4 months ago

Hey @ryanleecode would you like to contribute? very appreciated.