This message was deleted.
# general
s
This message was deleted.
h
why do you want pulumi's name for your resource group to be dynamic?
b
The resource group was just an example. Where I want to use this is on DNS resources, which are created dynamically.
h
Gotcha. The configuration data (the second argument) can have dynamic stuff built from other resource's outputs, but the first operand is intended to be Pulumi's unique name for the resource and not something that can/should vary dynamically
b
It doesn't vary, it's generated in a predictable way.
If I create a DNS record, the only way to guarantee that is is to append the dns_zone name to the key, so that we have a unique name that is also predictable.
But if this is not possible I have to find a different way. It's very disappointing, though.
h
the
Output
types are intended to represent data that may come back from the cloud provider. You're saying you don't have enough information to create a unique name until you've built some resource in azure?
I think you may be misunderstanding what the unique name is for
think of it more like the name of a variable
b
But that is correct, I don't necessarily have enough information.
The DNS zone is an integral part of the identity of a DNS record
If I'm running multiple environments, the DNS zones on those environments will be different, even though they might have the same basic domain name
I need to ask Pulumi "what is the zone that you've created", so I can reuse that information and guarantee uniqueness
b
@bright-policeman-55860 you can't use outputs as resource names because they're computed values. this blog post explains this in more detail: https://www.pulumi.com/blog/infrastructure-as-code-resource-naming/
b
Thank you for the detailed explanation. I understand, but deep down still wished it was possible. 🙂