sparse-intern-71089
02/10/2021, 9:44 PMtall-needle-56640
02/10/2021, 10:31 PMfancy-umbrella-67692
02/11/2021, 2:27 PMfancy-umbrella-67692
02/11/2021, 8:53 PMimport * as azure from "@pulumi/azure";
const resourceGroup = new azure.core.ResourceGroup("resourceGroup", {
location: 'Central US'
});
const storageAccount = new azure.storage.Account("storageAccount", {
resourceGroupName: resourceGroup.name,
accountTier: "Standard",
accountReplicationType: "LRS",
allowBlobPublicAccess: false
});
then after it's provisioned, update it to this:
update storage account to allow public blob access and create a new container.
import * as azure from "@pulumi/azure";
const resourceGroup = new azure.core.ResourceGroup("resourceGroup", {
location: 'Central US'
});
const storageAccount = new azure.storage.Account("storageAccount", {
resourceGroupName: resourceGroup.name,
accountTier: "Standard",
accountReplicationType: "LRS",
allowBlobPublicAccess: true
});
new azure.storage.Container('container', {
name: 'my-container',
storageAccountName: storageAccount.name,
containerAccessType: 'blob'
})
should get this error:
azure:storage:Container (container):
error: failed creating container: containers.Client#Create: Failure sending request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="PublicAccessNotPermitted" Message="Public access is not permitted on this storage account.\nRequestId:11415c7e-101e-0069-5ab7-002aaa000000\nTime:2021-02-11T20:49:28.8736873Z"
fancy-umbrella-67692
02/11/2021, 8:56 PMpulumi up
and then update it again with the new container with a different pulumi up
that will work, or you can just run pulumi up
twice with the existing code and it will create the container.tall-needle-56640
02/12/2021, 3:28 PMfancy-umbrella-67692
02/18/2021, 1:26 PMtall-needle-56640
02/18/2021, 8:13 PM