hey guys - having a bit of a problem after updatin...
# help
j
hey guys - having a bit of a problem after updating to 1.1.2. I was trying to bring the same naming so that I don’t have to tear down the environments we’ve got. So I have this:
Copy code
app.stack(MainStack, { stackName: 'main-stack' })
then I get this message:
Stack "main-stack" is not parameterized with the stage name. The stack name needs to either start with "$stage-", end in "-$stage", or contain the stage name "-$stage-".
so I change to this as per instructions:
Copy code
app.stack(MainStack, { stackName: '$stage-main-stack' })
then I get this message:
Stack name must match the regular expression: /^[A-Za-z][A-Za-z0-9-]*$/, got '$stage-main-stack'
so not sure what am I expected to do here
@Frank do you have any ideas?
t
I think you want to set id not stack name
j
I’m pretty sure it’s stack name, unless I’m understanding it wrong
oh now I see what you mean @thdxr this did the trick:
app.stack(MainStack, { id: 'main-stack' })
thank you!
r
I think you needed
Copy code
app.stack(MainStack, { stackName: `${stage}-main-stack` })
Rather than
Copy code
app.stack(MainStack, { stackName: '$stage-main-stack' })