sparse-intern-71089
01/20/2022, 2:44 PMhigh-leather-15669
01/20/2022, 2:46 PMkey_vault_uri=key_vault.name.apply(lambda keyvaultname: f"https://{keyvaultname}.<http://vault.azure.net/|vault.azure.net/>")
echoing-dinner-19531
01/20/2022, 3:41 PMGetSecret.Invoke
instead of InvokeAsync
. Invoke
can take Output<T>
as input values.sticky-exabyte-94099
01/21/2022, 11:19 AM//Set secret
var connectionStringSecret = new AzureNative.KeyVault.Secret("ConnectionString", new AzureNative.KeyVault.SecretArgs
{
Properties = new AzureNative.KeyVault.Inputs.SecretPropertiesArgs
{
Value = ConnectionStringWithPassword,
},
ResourceGroupName = ResourceGroup.Apply(t => t.Name),
SecretName = "connectionString-secret",
VaultName = KeyVault.Name,
});
var toUseNow = connectionStringSecret.Properties.Apply(t => t.SecretUri);
// Get somewhere
var connectionStringGetSecret = AzureNative.KeyVault.GetSecret.Invoke(new AzureNative.KeyVault.GetSecretInvokeArgs()
{
ResourceGroupName = ResourceGroup.Apply(t => t.Name),
SecretName = "connectionString-secret",
VaultName = KeyVault.Name
});
var secretUri = connectionStringGetSecret.Apply(t => t.Properties.SecretUri);
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by