https://pulumi.com logo
Title
i

icy-doctor-13719

01/03/2023, 3:32 PM
have you tried setting it on the AzureNative.Storage.BlobContainer resource?
m

many-telephone-49025

01/03/2023, 3:35 PM
Hi @straight-sunset-92336, are you using the native or classic provider?
You may nee to set
PublicNetworkAccess:   pulumi.String("Disabled"),
in your example
here in go:
v20220901.NewStorageAccount(ctx, "test_sa", &v20220901.StorageAccountArgs{
			ResourceGroupName: resourceGroup.Name,
			Location:          resourceGroup.Location,
			AccountName:       pulumi.String("testsadirien"),
			Sku: &v20220901.SkuArgs{
				Name: pulumi.String(v20220901.SkuName_Standard_LRS),
			},
			Kind:                  pulumi.String("StorageV2"),
			AllowBlobPublicAccess: pulumi.Bool(false),
			PublicNetworkAccess:   pulumi.String(v20220901.PublicNetworkAccessDisabled),
			NetworkRuleSet: &v20220901.NetworkRuleSetArgs{
				DefaultAction: v20220901.DefaultActionDeny,
			},
		})
s

straight-sunset-92336

01/04/2023, 7:43 AM
I cannot find the parameter PublicNetworkAccess in the docs; https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/storageaccount/ Also getting error when I try to use it:
Object literal may only specify known properties, and 'PublicNetworkAccess' does not exist in type 'StorageAccountArgs'.
m

many-telephone-49025

01/04/2023, 7:44 AM
Use a different API Version! The default one is outdated!