https://pulumi.com logo
#azure
Title
# azure
a

adventurous-butcher-54166

10/14/2022, 12:58 PM
I was trying to configure public network access settings for storage accounts using the
pulumi-azure-native
Python SDK (seems to apply to all languages though) and there seems to be a missing property. The property is
public_network_access
which sets network access configurations for a storage account (see screenshot from Azure Portal). This property was introduced in the Azure API spec for storage accounts in
2021-06-01
but the provider seems to be generating the SDK based on a very old spec
2021-02-01
with 5 newer versions available, the newest being
2022-05-01
and Azure using
2021-09-01
in their docs. Azure REST API docs, showing version 2021-09-01, with the property available: https://learn.microsoft.com/en-us/rest/api/storagerp/storage-accounts/create?tabs=HTTP Pulumi’s storage.StorageAccount where the property was first available: https://github.com/pulumi/pulumi-azure-native/blob/master/sdk/python/pulumi_azure_native/storage/v20210601/storage_account.py#L43 Current storage.StorageAccount: https://github.com/pulumi/pulumi-azure-native/blob/master/sdk/python/pulumi_azure_native/storage/storage_account.py Questions • How come the SDK is based on such an old spec for storage accounts? • Is it considered okay to use other versions of the spec in code? Like referencing:
storage.v20220501.storage_account
h

happy-parrot-60128

10/14/2022, 4:09 PM
In answer to the two question: • The “default” exported version is quite old now as we’ve strived to avoid any breaking changes since the original launch. There will a major ‘2.0’ version released in the future that will bump these default versions to newer API versions. • Yes, I would actively encourage the use of the explicit versions in the SDK as these should have much less impact between major versions of the SDK and will allows you to utilise new features ahead of them coming into the default version.
a

adventurous-butcher-54166

10/14/2022, 4:10 PM
Thanks for the clarification @happy-parrot-60128 💡
3 Views