Resource mode: Avoid the API calls (and any potential error) if only exporting for the specified resources #650
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With #643, the resource mode will always need to use
azlistto do a GET for each resource, no matter if it is necessary or not. Due to the design ofazlist, it internally uses a resource type file to lookup the correct API versions to use for each resource type. This might cause issues if the resource type is a relatively new one, which is not available in the (outdated) resource type file (see: #648).Instead, if the user doesn't need to query more resources than what are specified (e.g. child resource, extension resource, etc.), there is no need to call into
azlist. In this case, we can simply return the resource set as is specified.Additionally, this PR removes the
Propertiesfrom typeresourceset.AzureResource. ThePropertiesare meant to be returned fromazlist, and is used only for one specific case of populating managed disks for VM. This is not needed any more, which was introduced beforeaztftexits, and was leveraging the ARM template. See: #34.