Skip to content

why not use pulumi for the ion example? #212

Description

@ryanleecode

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],
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions