I made a terrible mistake and tried to deploy to Prod at 1am :face_with_spiral_eyes: I am using SST ...
c
I made a terrible mistake and tried to deploy to Prod at 1am 😵‍💫 I am using SST Ion, first time with AWS and SST and Pulumi. I have an existing user pool, so I transform the name to match the exisiting user pool name. Instead it creates a new pool with basically a random name. How can I reuse the existing pool? Thank you!
f
Ah, you're looking for how to import an existing resource. What language are you using?
c
Typescript, using SST Ion
f
In TS there is typically a
name
parameter that can be passed to the resource options; in addition to the name that is passed to pulumi. Specifying both disables the random-suffix feature.
c
Hmmm this is what I currently have
Copy code
...($app.stage === "production"
            ? {
                name: "training-pool-prod",

                passwordPolicy: {
                  minimumLength: 12,
                  requireLowercase: true,
                  requireNumbers: true,
                  requireSymbols: true,
                  requireUppercase: true,
                  temporaryPasswordValidityDays: 7,
                },
              }
            : {}),