plain-eye-9759
12/04/2019, 5:17 PM"variables": {
"storageAccountName": config.appServicePlanStorageName,
"storageAccountKey": appStorageAccount.primaryAccessKey,
"location": config.location,
}
Note that storageAccountKey
is gotten from another resource
When the resource got deployed, the value of storageAccountKey was this:
Calling [toJSON] on an [Output<T>] is not supported.\\n\\nTo get the value of an Output as a JSON value or JSON string consider either:\\n 1: o.apply(v => v.toJSON())\\n 2: o.apply(v => JSON.stringify(v))\\n\\nSee <https://pulumi.io/help/outputs> for more details.\\nThis function may throw in a future version of @pulumi/pulumi.
I have tried
"storageAccountKey": appStorageAccount.primaryAccessKey.apply(v => JSON.stringify(v))
"storageAccountKey": pulumi.output(appStorageAccount.primaryAccessKey).apply(JSON.stringify)
`"storageAccountKey": pulumi.all([appStorageAccount.primaryAccessKey]).apply(([v]) => ${v}
)`tall-librarian-49374
12/04/2019, 9:15 PMpulumi.all([config.appServicePlanStorageName, appStorageAccount.primaryAccessKey]).apply(([name, key]) => /* use name and key in JSON object*/
plain-eye-9759
12/05/2019, 1:09 PM