hi guys, wander if someone can help.? I'm trying t...
# azure
r
hi guys, wander if someone can help.? I'm trying to do a poc storing pulumi state into azure blob storage, but having issues with it not recognizing the account name I've setup in env variables....
Copy code
RESOURCE_GROUP_NAME=rg-name
AZURE_STORAGE_ACCOUNT=sa-account-name
STORAGE_CONTAINER_NAME="pulumi-state"
CONNECTION_STRING=$(az storage account show-connection-string -n "$AZURE_STORAGE_ACCOUNT" -g $RESOURCE_GROUP_NAME -o tsv)
az storage container create -n "$STORAGE_CONTAINER_NAME" --connection-string "$CONNECTION_STRING"
- generate a sas token
Copy code
end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
AZURE_STORAGE_SAS_TOKEN = $(az storage account generate-sas --permissions cdlruwap --account-name "$AZURE_STORAGE_ACCOUNT" --services qt --resource-types sc --expiry "$end" --output tsv)
this is the error am getting: /azdo_projects$ pulumi login azblob://pulumi-state error: problem logging in: unable to open bucket azblob://pulumi-state: azureblob.OpenBucket: accountName is required followed this example here but no luck : https://woivre.com/blog/2020/02/pulumi-store-your-state-in-azure-storage
k
My setup is slightly different but does work
Copy code
AZURE_STORAGE_ACCOUNT: pulumibackendXXXX
AZURE_STORAGE_KEY: XXXX
pulumi login <azblob://pulumi-state>
, (pulumi-state blob container must exist)