pulumi-azure-native
pulumi-azure-native copied to clipboard
Pass resource token into applyAzureSpecificDiff
The applyAzureSpecificDiff method does not currently have any awareness of what type of resource it's applying to. When introducing resource-specific customisations, we should accurately target specific resources, therefore we should ensure that the required information is passed to this method to make accurate decisions.
https://github.com/pulumi/pulumi-azure-native/blob/ba9989dc50a38ebe35e506da1680e37a394a061f/provider/pkg/provider/diff.go#L458
Additionally, the API version could be critical information when considering changes, as old API versions might use different values for fields which cause replacement, such as the existing SKU migration for Managed Clusters.
- See also: https://github.com/pulumi/pulumi-azure-native/issues/3766
The missing ingredient at the provider protocol level is the type token associated with the old state. Combined with https://github.com/pulumi/pulumi-azure-native/issues/3766 we would have all the information needed to drive migration logic.