full-art-48671
01/27/2025, 4:32 AM# Enable static website support
static_website = storage.StorageAccountStaticWebsite(
"staticWebsite",
account_name=account.name,
resource_group_name=resource_group.name,
index_document="index.html",
)
Errors with the following when doing a 'pulumi up'. I have not uploaded the index.html - I narrowed the error down to just the snippet above.
(venv) sr@stinky:~/src/quickstart$ pulumi up
Previewing update (dev)
View in Browser (Ctrl+O): <https://app.pulumi.com/><snip>/quickstart/dev/previews/d80c7b52-66a5-43dd-b047-c6db7c991a54
Type Name Plan
pulumi:pulumi:Stack quickstart-dev
+ └─ azure-native:storage:StorageAccountStaticWebsite staticWebsite create
Resources:
+ 1 to create
3 unchanged
Do you want to perform this update? yes
Updating (dev)
View in Browser (Ctrl+O): <https://app.pulumi.com/><snip>/quickstart/dev/updates/5
Type Name Status Info
pulumi:pulumi:Stack quickstart-dev **failed** 1 error
+ └─ azure-native:storage:StorageAccountStaticWebsite staticWebsite **creating failed** 1 error
Diagnostics:
pulumi:pulumi:Stack (quickstart-dev):
error: update failed
azure-native:storage:StorageAccountStaticWebsite (staticWebsite):
error: GET https://<snip>.blob.core.windows.net
--------------------------------------------------------------------------------
RESPONSE 403: 403 This request is not authorized to perform this operation using this permission.
ERROR CODE: AuthorizationPermissionMismatch
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthorizationPermissionMismatch</Code><Message>This request is not authorized to perform this operation using this permission.
RequestId:8a2a4554-d01e-0016-2e74-709ba1000000
Time:2025-01-27T04:30:11.3935750Z</Message></Error>
--------------------------------------------------------------------------------
Outputs:
account_name : "<snip - I added this output>"
primary_storage_key: "<snip>"
Resources:
3 unchanged
Duration: 6s
For additional info - I've used the Azure CLI to do these steps manually from the same shell with the same az login, so I don't really think it's a general permissions issue - I was able to run through these steps with no issue.
Anyone able to put me out of my misery to let me know what might be causing pulumi to fail on this step? Thanks in advance!full-art-48671
01/27/2025, 4:59 AMaz account set --subscription <id>
) but that also errored out the same way.
I can provide the debug output if it might be helpful, but it'd need some strings removed in a fair few places first, as well as some reformatting - unless someone can suggest a command better than pulumi up --logtostderr -v=9 --debug
which might need less work to clean up?full-art-48671
01/27/2025, 6:19 AMearly-advantage-63854
01/27/2025, 11:54 AMAZURE_STORAGE_KEY
in env is not set.
But try to give your user the Role for Storage Blob Data Contributor
directly in the storageaccount(IAM) instead of exposing the key.full-art-48671
01/30/2025, 10:42 PMearly-advantage-63854
02/03/2025, 8:48 AMAZURE_STORAGE_KEY
to write on it. Giving your User the permission to do contribute, avoids that.
So what exactly do you want to do? Write on the Sta?full-art-48671
02/05/2025, 2:25 AM# Enable static website support
static_website = storage.StorageAccountStaticWebsite(
"staticWebsite",
account_name=account.name,
resource_group_name=resource_group.name,
index_document="index.html",
)
But putting that in to the __main__.py
file gives me the error in the first post.
It seems like my 'normal' Azure account doesn't work as is with Pulumi (which is using az login's magic to authenticate), but manual steps work when I'm using the azure cli. Considering this is the start of my journey with Pulumi, I'm not sure what else I'm expected to know or provide.