Hi everyone! Excited by the news of a truly first-...
# azure
p
Hi everyone! Excited by the news of a truly first-class Azure provider, we have now started the work of trying to migrate our programs over to AzureNextGen. We could use some guidance on a couple of things. I’ll post them as separate messages here to allow them to be discussed in separate threads. First topic is about the versioning. I have not been able to make full sense of it yet, so for my understanding: 1. Is it correct that the versions are basically “per ARM resource provider”, i.e. each resource provider on the Azure side versions independently of all the others? 2. To which version does “latest” actually resolve? My experience so far indicates that it is neither the latest, nor the latest preview, at least for the
authorization
module which I’ve been struggling with a bit (more on that later). 3. Does the meaning of “latest” always stay the same as long as we don’t update to a new version of the
Pulumi.AzureNextGen
NuGet package? 4. What is the general guidance on which version to use? Should we generally use “latest” whenever possible?
s
Hi! Welcome! Sorry going to slowly work through answering these questions… 1. The versioning is determined by the version as published in the Azure API spec for each resource provider. 2. Generally latest corresponds to the latest stable api version for that resource provider. We typically release an update every week with the latest specs from the azure API spec. Will have to take a look at the authorization module you mentioned to see if there is a drift. 3. If you stay pinned to a version of the SDK/provider, latest shouldn’t change but I wouldn’t recommend taking a strong dependency on this since the provider is still evolving. We can’t guarantee minor version releases not including bumps to api versions since that is controlled by the respective azure services. 4. My recommendation is to treat Latest as a convenience symlink for prototyping but recommend using an actual versioned equivalent in production. There is a change about to be released which will include the actual api version in the description field for resources marked on latest which should help.
p
Hi Vivek, thanks for these answers! 👍 All makes sense. Regarding #2, yes I’d be interested to know which version we are actually ending up on when using latest on
authorization
.
t
As a little help, you can now see what the latest version refers to in the docs, e.g. in https://www.pulumi.com/docs/reference/pkg/azure-nextgen/authorization/roledefinition/
p
That’s great! 👍
t
Out of curiousity, why is
RoleDefinition
using such an old version? It looks like there have been 11 stable releases since that one.
t
None of those stable versions have a
RoleDefinition
resource
👍 1
b
It’s very nice to get the latest API version mentioned in the doc. But some haven’t yet. For example, https://www.pulumi.com/docs/reference/pkg/azure-nextgen/operationalinsights/querypack/, but we can see in the example that it used a preview version. This may be the reason.
t
Yes, previews don’t have
Latest
.
Copy code
V20190901Preview
is the version that you have.
I guess we could mention this explicitly. Would you file an issue for that?
b
Also, I spent some time last week to find what is the specific version to use with the function operationalinsights.ListWorkspaceKeys and it seems that no version except the
latest
expose it. And I was not able to find this function in the Azure documentation https://docs.microsoft.com/en-us/azure/templates/microsoft.operationalinsights/allversions 🤔 So I wonder how I can do the mapping between pulumi resources/function and the azure template documentation? Is this explain somewhere?
That’s said, a big thanks 👏 because using next gen fixed some issues I had for long time with the terraform provider 🎉
t
It’s v20150320
We should publish it too in the docs
b
Oh dear, I’m not so good at searching in files 😂, thanks !
I still don’t find where is the ListWorkspaceKeys documented in the azure documentation. The best I was able to find is a reference to the
listKeys
https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource?tabs=json#implementations
Microsoft.OperationalInsights/workspaces. list
Microsoft.OperationalInsights/workspaces listKeys
t
Yes, it’s the same. We use naming that is more aligned with Azure SDK than ARM templates
👍 1