Open timvancann opened 3 years ago
This is intentional. None of Pulumi providers supply functions to list resources.
The idea is that you would use Azure SDKs (ones provided by Microsoft) in case you need to retrieve this additional information. You can find an example here: https://github.com/pulumi/pulumi-azure-native/issues/610#issuecomment-767600198
@mikhailshilkov Thanks for the comment. Out of curiosity, what was the idea behind this intention? Are there any plans/ideas to support this functionality in the future? I almost seems a no brainer :).
I think it's a combination of factors:
May I invert the question and ask why you want this to be a part of our SDK instead of the Azure SDK?
Mostly for convenience, in particularly for authentication. During pulumi up/preview
authentication against Azure is already taken care off. Especially the Python SDK for authentication is cumbersome and doesn't work as nice as the TypeScript example. If I could simply reuse whatever session pulumi is running on with the Azure SDK then all problems would be solved, but I also understand that this is not possible since both use vastly different objects :).
Having said that, I fully understand and appreciate your reasoning.
Especially the Python SDK for authentication is cumbersome and doesn't work as nice as the TypeScript example.
Our getClientToken
function can give you the auth token that you should be able to use to authenticate the Python SDK.
We have a task open to provide examples of this in all languages.
There are a lot of missing functions in the SDK to
list
a set of resources, e.g. List ADF DataSets and crucially List Role Definitions.I'm unsure why these are missing, but it seems this is a generic omission during the generation of the code.
Affected feature