We recommend using Azure Native.
azure.keyvault.getSecrets
Explore with Pulumi AI
Use this data source to retrieve a list of secret names from an existing Key Vault Secret.
Using getSecrets
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getSecrets(args: GetSecretsArgs, opts?: InvokeOptions): Promise<GetSecretsResult>
function getSecretsOutput(args: GetSecretsOutputArgs, opts?: InvokeOptions): Output<GetSecretsResult>
def get_secrets(key_vault_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecretsResult
def get_secrets_output(key_vault_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecretsResult]
func GetSecrets(ctx *Context, args *GetSecretsArgs, opts ...InvokeOption) (*GetSecretsResult, error)
func GetSecretsOutput(ctx *Context, args *GetSecretsOutputArgs, opts ...InvokeOption) GetSecretsResultOutput
> Note: This function is named GetSecrets
in the Go SDK.
public static class GetSecrets
{
public static Task<GetSecretsResult> InvokeAsync(GetSecretsArgs args, InvokeOptions? opts = null)
public static Output<GetSecretsResult> Invoke(GetSecretsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecretsResult> getSecrets(GetSecretsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:keyvault/getSecrets:getSecrets
arguments:
# arguments dictionary
The following arguments are supported:
- Key
Vault stringId Specifies the ID of the Key Vault instance to fetch secret names from, 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.
- Key
Vault stringId Specifies the ID of the Key Vault instance to fetch secret names from, 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.
- key
Vault StringId Specifies the ID of the Key Vault instance to fetch secret names from, 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.
- key
Vault stringId Specifies the ID of the Key Vault instance to fetch secret names from, 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.
- key_
vault_ strid Specifies the ID of the Key Vault instance to fetch secret names from, 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.
- key
Vault StringId Specifies the ID of the Key Vault instance to fetch secret names from, 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.
getSecrets Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Vault stringId - Names List<string>
- List containing names of secrets that exist in this Key Vault.
- Secrets
List<Get
Secrets Secret> - One or more
secrets
blocks as defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Vault stringId - Names []string
- List containing names of secrets that exist in this Key Vault.
- Secrets
[]Get
Secrets Secret - One or more
secrets
blocks as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Vault StringId - names List<String>
- List containing names of secrets that exist in this Key Vault.
- secrets
List<Get
Secrets Secret> - One or more
secrets
blocks as defined below.
- id string
- The provider-assigned unique ID for this managed resource.
- key
Vault stringId - names string[]
- List containing names of secrets that exist in this Key Vault.
- secrets
Get
Secrets Secret[] - One or more
secrets
blocks as defined below.
- id str
- The provider-assigned unique ID for this managed resource.
- key_
vault_ strid - names Sequence[str]
- List containing names of secrets that exist in this Key Vault.
- secrets
Sequence[Get
Secrets Secret] - One or more
secrets
blocks as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Vault StringId - names List<String>
- List containing names of secrets that exist in this Key Vault.
- secrets List<Property Map>
- One or more
secrets
blocks as defined below.
Supporting Types
GetSecretsSecret
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.