Skip to content
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

why not use pulumi for the ion example? #212

Open
ryanleecode opened this issue Jul 16, 2024 · 1 comment
Open

why not use pulumi for the ion example? #212

ryanleecode opened this issue Jul 16, 2024 · 1 comment

Comments

@ryanleecode
Copy link

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants