great-sunset-355
07/22/2021, 9:41 AMname_prefix
- I found several existing issues about this so I'm not sure I should even use it.
One of the issues: https://github.com/pulumi/pulumi/issues/6155
With pulumi resource you have to provide resource_name
and if nothing else is set, this is used in the name of resource.
eg. SNS Topic:
sns.Topic(
"my-topic",
)
Results in the resource name my-topic-1234
. - this at least gives the reference between actual resource and pulumi resource
However when I add the name_prefix
it overrides the resource name completely.
sns.Topic(
"my-topic",
name_prefix='my-prefix-'
)
Results in the resource name: my-prefix-20210722092833209300000002
Is there any documentation about this behaviour? I assume this is inherited from terraform provider and may be resoveld with pulumi native provider which I heard about being in development, correct?
Is it better for now to use pulumi resource name
instead of name_prefix?billowy-army-68599
07/22/2021, 5:13 PMgreat-sunset-355
07/23/2021, 7:59 AM