worxspace / PSPulumi

GNU General Public License v3.0
7 stars 1 forks source link

New-AzureNativeNetworkSecurityRule fails with InvalidApiVersionParameter #15

Closed NNG9y1PQdXl closed 1 year ago

NNG9y1PQdXl commented 1 year ago

Using: Pulumi v3.66.0 azure-native 1.102.0 pspulumiyaml.azurenative.network 0.0.4

Trying to execute New-AzureNativeNetworkSecurityRule i'm getting the following error

Diagnostics: azure-native:network:SecurityRule (nsgrulename): error: cannot check existence of resource '/subscriptions/subscriptionid/resourceGroups/resourcegroupname/providers/Microsoft.Network/networkSecurityGroups/NSGName/securityRules/nsgrulename': status code 400, {"error":{"code":"InvalidApiVersionParameter","message":"The api-version '2020-11-01' is invalid. The supported versions are '2023-03-01-preview,2022-12-01,2022-11-01-preview,2022-09-01,2022-06-01,2022-05-01,2022-03-01-preview,2022-01-01,2021-04-01,2021-01-01,2020-10-01,2020-09-01,2020-08-01,2020-07-01,2020-06-01,2020-05-01,2020-01-01,2019-11-01,2019-10-01,2019-09-01,2019-08-01,2019-07-01,2019-06-01,2019-05-10,2019-05-01,2019-03-01,2018-11-01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."}}

It is apparently related to the following Issue at azure-native: https://github.com/pulumi/pulumi-azure-native/issues/2011

Now, it breaks at least NSG rule creation, possibly some other functions as well. No idea when it will be fixed upstream, is there any way to work-around it by forcing specific API version?

Kind regards

NNG9y1PQdXl commented 1 year ago

Closing, it was actually a duplicate of https://github.com/pulumi/pulumi-azure-native/issues/1487

I didn't provide $resourceGroupName for New-AzureNativeNetworkSecurityRule and this is apparently an issue with pulumi-azure-native, that such an error is returned, apparently not related to the problem.

Just one point to raise, shouldn't $resourceGroupName parameter be set as Mandatory in scope of New-AzureNativeNetworkSecurityRule, alongside with others, listed https://www.pulumi.com/registry/packages/azure-native/api-docs/network/securityrule/#inputs ?