how do we prevent the random number?
# general
b
how do we prevent the random number?
w
You can pass
name:
to force the name to a specific value - else Pulumi generates an auto name by default. The auto name is quite useful, it ensures that you can replace the resource without downtime by creating a new one before destroying the old one. For many/most resources this is very useful. If you provide and explicit name, it may be necessary to delete the resource before replacing it in case of changes (because AWS won’t let you have two resources with the same name). It also helps ensure you can multi-instantiate a stack without fear of collision. But if you do want to get a specific name for your resource,
name:
should work.
b
So if I do this:
Copy code
let table = new aws.dynamodb.Tabl('mytable', {...})
Pulumi will generate a resource name with a random number. But if I do this:
Copy code
let table = new aws.dynamodb.Table('mytable', {
  name: 'mytable',
  ...
})
Pulumi will create the table as just: mytable
w
Exactly. The first example will autoname the resource using the Pulumi resource name as a prefix and a random suffix to ensure uniqueness.
b
Thank u again!