https://pulumi.com logo
#azure
Title
# azure
b

better-shampoo-48884

05/21/2021, 11:32 AM
Trying to figure out how to scope this to the correct subscription: https://www.pulumi.com/docs/reference/pkg/azure-native/containerservice/listmanagedclusteradmincredentials/ The code is inside a ComponentResource which has a provider attached:
Copy code
const currentKubeconfig = pulumi.all([aks.name, args.group[group.location].name]).apply(([clusterName, rgName]) => {
                            return azure.containerservice.listManagedClusterAdminCredentials({
                                resourceGroupName: rgName,
                                resourceName: clusterName,
                            })
                        })
It seems I can attach a provider to the listManagedClusterAdmin - but how would I get that from the parent ComponentResource?
Right now the workaround is to pass the provider as an argument to the ComponentResource and then set that explicitly, but I would prefer a more elegant solution 😉
3 Views