Adds support for importing Azure resources via azure-native. Roughly works by:
Calling the List Resources ARM API filtered by location and subscription
Attempting to convert types into a pulumi token
doing a lookup against the azure-native schema to make sure the translated type exists
sending the import spect to a channel and performing a GetResource operation on the other end
I was able to get this to succeed on all but one resource in the pulumi subscription except for one resource that was returned by list but 404d when I tried to read it. I assume this is because my user is lacking some permissions on that specific resource.
The buggiest part of this is (2) as azure returns something like Microsoft.Network/dnszones and our resource schema assumes that this value is singular and that acronyms are capitalized. I use a library for plurality that seems to work pretty well, but haven't tried to tackle acronyms.
I saw this in the AWS importer as well, but it seems like storing a mapping from the cloud provider literal type to whatever we translate it to, would be super useful for building this category of tooling.
Adds support for importing Azure resources via azure-native. Roughly works by:
GetResource
operation on the other endI was able to get this to succeed on all but one resource in the pulumi subscription except for one resource that was returned by list but 404d when I tried to read it. I assume this is because my user is lacking some permissions on that specific resource.
The buggiest part of this is (2) as azure returns something like
Microsoft.Network/dnszones
and our resource schema assumes that this value is singular and that acronyms are capitalized. I use a library for plurality that seems to work pretty well, but haven't tried to tackle acronyms.I saw this in the AWS importer as well, but it seems like storing a mapping from the cloud provider literal type to whatever we translate it to, would be super useful for building this category of tooling.