get Key
Use this data source to access information about an existing Key Vault Key.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.keyvault.KeyvaultFunctions;
import com.pulumi.azure.keyvault.inputs.GetKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = KeyvaultFunctions.getKey(GetKeyArgs.builder()
.name("secret-sauce")
.keyVaultId(data.azurerm_key_vault().existing().id())
.build());
ctx.export("keyType", example.applyValue(getKeyResult -> getKeyResult.keyType()));
}
}
Content copied to clipboard
Return
A collection of values returned by getKey.
Parameters
argument
A collection of arguments for invoking getKey.
Return
A collection of values returned by getKey.
See also
Parameters
key Vault Id
Specifies the ID of the Key Vault instance where the Secret resides, available on the azure.keyvault.KeyVault
Data Source / Resource. NOTE: The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription.
name
Specifies the name of the Key Vault Key.
Return
A collection of values returned by getKey.
See also
Parameters
argument
Builder for com.pulumi.azure.keyvault.kotlin.inputs.GetKeyPlainArgs.