https://pulumi.com logo
#typescript
Title
# typescript
l

late-lizard-19909

08/16/2022, 2:10 PM
Copy code
const domainSecretGet = azure_native.keyvault.getSecret({
    secretName: "secret1",
    vaultName: "AZVault1",
    resourceGroupName: "AZVault"
});

export const domainSecretGetValue = domainSecretGet.then(domainSecretGet => domainSecretGet.properties.value);

console.log(domainSecretGetValue)
s

steep-toddler-94095

08/17/2022, 4:46 AM
you can only access the resolved value inside the
.then
callback function, e.g.
Copy code
export const domainSecretGetValue = domainSecretGet.then(domainSecretGet => {
  console.log(domainSecretGet.properties.value)
  return domainSecretGet.properties.value
})
2 Views