https://pulumi.com logo
Title
p

prehistoric-nail-50687

11/11/2020, 4:04 PM
Looking at the example of an ApplicationGateway at https://www.pulumi.com/docs/reference/pkg/azure-nextgen/network/applicationgateway/ specially at this bit:
frontendIPConfiguration: {
                id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip",
            },
            frontendPort: {
                id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp",
            },
I was wondering if there is some way to do something like a self-reference (e.g.
this
or
self
) Because the objects referenced in these example are aztually referencing an other object within the same resource. So this would become something like:
frontendIPConfiguration: {
                id: "${self.id}/frontendIPConfigurations/appgwfip",
            },
            frontendPort: {
                id: "${self.id}/frontendPorts/appgwfp",
            },
It feels very wrong to create the whole path/reference by hand, specially as I would also need access to the
subid
(SubscriptionID) which I think one should not deal with, it is implicit given by the connected user/principal.
t

tall-librarian-49374

11/11/2020, 4:13 PM
I don’t think this is possible… The closest is probably using
resourceGroup.id
so that you don’t need to deal with that part
There are lot of unfortunate design decisions in Network RP of ARM