helpful-rain-41425
01/21/2021, 2:32 AMimport pulumi
from pulumi_azure_nextgen.containerinstance import latest as containerinstance
from pulumi_azure_nextgen.resources import latest as resources
from pulumi_azure_nextgen.storage import latest as storage
app_name = "tigstack"
resource_group = resources.ResourceGroup("resourceGroup",
resource_group_name="rg-syd-dev-{0}".format(app_name),
location="australiaeast")
account = storage.StorageAccount("storageAccount",
account_name="grafana",
resource_group_name=resource_group.name,
location=resource_group.location,
sku=storage.SkuArgs(
name="Standard_LRS"
),
kind="StorageV2")
file_share = storage.FileShare("smbFileShare",
account_name=account.name,
enabled_protocols="SMB",
resource_group_name=resource_group.name,
share_name="tigstack")
storageAccountKeys = pulumi.Output.all(resource_group.name, account.name).apply(
lambda args: storage.list_storage_account_keys(args))
I came up with that where I want to refer to storageAccountKeys later in the code but it doesn't seem to work - i think I don't understand the output.all that wellwitty-candle-66007
01/21/2021, 1:00 PMlist_storage_account_keys
needs to specify the property names and not just the values. So something like this:
storageAccountKeys = pulumi.Output.all(resource_group.name, account.name).apply(
lambda args: storage.list_storage_account_keys(resource_group_name: args[0], account_name: args[1]))
helpful-rain-41425
01/21/2021, 7:45 PM