Hi, I have a duplicate problem, How do you make a ...
# getting-started
g
Hi, I have a duplicate problem, How do you make a parent name appear in the urn ?
Copy code
urn:pulumi:acme-staging-euw1-01::customers-env-v1::company:aws/iam:PulumiStackIAM$
    company:aws:Account$ # <---- HERE
        aws:iam/role:Role::CompanyPulumiAWSCustomersAcmeEUW1Staging01Role

urn:pulumi:acme-staging-euw1-01::customers-env-v1::company:aws/iam:PulumiStackIAM$
    company:aws:Account$ # <---- HERE
        aws:iam/role:Role::CompanyPulumiAWSCustomersAcmeEUW1Staging01Role
I'd like this:
Copy code
urn:pulumi:acme-staging-euw1-01::customers-env-v1::company:aws/iam:PulumiStackIAM$
    company:aws:Account::customer-acme$ # <---- HERE
        aws:iam/role:Role::CompanyPulumiAWSCustomersAcmeEUW1Staging01Role

urn:pulumi:acme-staging-euw1-01::customers-env-v1::company:aws/iam:PulumiStackIAM$
    company:aws:Account::company-internal$ # <---- HERE
        aws:iam/role:Role::CompanyPulumiAWSCustomersAcmeEUW1Staging01Role
e
parent names don't show in urns, just parent types. We'd really like to change this but it'll break the world if done badly so needs a lot of careful design.
g
yeah that's what claude told me
Maybe a "special" container that includes its name in its urn would do the trick ?
e
you can do that today! Make a component resource and just put the name as the type when calling the base class constructor.
g
yeah but I'm not ready to do something hackish like that if you're considering the matter on your side
e
Its a little hacky but it should work fairly well. Just will make aliases a bit confusing I think (because you'll need to alias the name and the type). While we want to fix this I suspect its going to be to a long time till we can get everything lined up to actually pull it off.
g
Yeah but if you do fix it one day, my workaround will surely be in the way of your migration process.
e
Should be fine actually