We recommend using Azure Native.
Use this data source to retrieve a list of certificate names from an existing Key Vault.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as std from "@pulumi/std";
const example = azure.keyvault.getCertificates({
keyVaultId: existing.id,
});
const exampleGetCertificate = example.then(example => std.toset({
input: example.names,
})).then(invoke => .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: azure.keyvault.getCertificate({
name: __key,
keyVaultId: existing.id,
}) })));
import pulumi
import pulumi_azure as azure
import pulumi_std as std
example = azure.keyvault.get_certificates(key_vault_id=existing["id"])
example_get_certificate = {__key: azure.keyvault.get_certificate(name=__key,
key_vault_id=existing["id"]) for __key, __value in std.toset(input=example.names).result}
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var example = Azure.KeyVault.GetCertificates.Invoke(new()
{
KeyVaultId = existing.Id,
});
var exampleGetCertificate = Std.Toset.Invoke(new()
{
Input = example.Apply(getCertificatesResult => getCertificatesResult.Names),
}).Apply(invoke => );
});
Example coming soon!
Example coming soon!
Using getCertificates
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 getCertificates(args: GetCertificatesArgs, opts?: InvokeOptions): Promise<GetCertificatesResult>
function getCertificatesOutput(args: GetCertificatesOutputArgs, opts?: InvokeOptions): Output<GetCertificatesResult>def get_certificates(include_pending: Optional[bool] = None,
key_vault_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCertificatesResult
def get_certificates_output(include_pending: Optional[pulumi.Input[bool]] = None,
key_vault_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCertificatesResult]func GetCertificates(ctx *Context, args *GetCertificatesArgs, opts ...InvokeOption) (*GetCertificatesResult, error)
func GetCertificatesOutput(ctx *Context, args *GetCertificatesOutputArgs, opts ...InvokeOption) GetCertificatesResultOutput> Note: This function is named GetCertificates in the Go SDK.
public static class GetCertificates
{
public static Task<GetCertificatesResult> InvokeAsync(GetCertificatesArgs args, InvokeOptions? opts = null)
public static Output<GetCertificatesResult> Invoke(GetCertificatesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCertificatesResult> getCertificates(GetCertificatesArgs args, InvokeOptions options)
public static Output<GetCertificatesResult> getCertificates(GetCertificatesArgs args, InvokeOptions options)
fn::invoke:
function: azure:keyvault/getCertificates:getCertificates
arguments:
# arguments dictionaryThe following arguments are supported:
- Key
Vault stringId Specifies the ID of the Key Vault instance to fetch certificate names from, available on the
azure.keyvault.KeyVaultData 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.
- Include
Pending bool - Specifies whether to include certificates which are not completely provisioned. Defaults to true.
- Key
Vault stringId Specifies the ID of the Key Vault instance to fetch certificate names from, available on the
azure.keyvault.KeyVaultData 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.
- Include
Pending bool - Specifies whether to include certificates which are not completely provisioned. Defaults to true.
- key
Vault StringId Specifies the ID of the Key Vault instance to fetch certificate names from, available on the
azure.keyvault.KeyVaultData 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.
- include
Pending Boolean - Specifies whether to include certificates which are not completely provisioned. Defaults to true.
- key
Vault stringId Specifies the ID of the Key Vault instance to fetch certificate names from, available on the
azure.keyvault.KeyVaultData 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.
- include
Pending boolean - Specifies whether to include certificates which are not completely provisioned. Defaults to true.
- key_
vault_ strid Specifies the ID of the Key Vault instance to fetch certificate names from, available on the
azure.keyvault.KeyVaultData 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.
- include_
pending bool - Specifies whether to include certificates which are not completely provisioned. Defaults to true.
- key
Vault StringId Specifies the ID of the Key Vault instance to fetch certificate names from, available on the
azure.keyvault.KeyVaultData 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.
- include
Pending Boolean - Specifies whether to include certificates which are not completely provisioned. Defaults to true.
getCertificates Result
The following output properties are available:
- Certificates
List<Get
Certificates Certificate> - One or more
certificatesblocks as defined below. - Id string
- The provider-assigned unique ID for this managed resource.
- Key
Vault stringId - The Key Vault ID.
- Names List<string>
- List containing names of certificates that exist in this Key Vault.
- Include
Pending bool
- Certificates
[]Get
Certificates Certificate - One or more
certificatesblocks as defined below. - Id string
- The provider-assigned unique ID for this managed resource.
- Key
Vault stringId - The Key Vault ID.
- Names []string
- List containing names of certificates that exist in this Key Vault.
- Include
Pending bool
- certificates
List<Get
Certificates Certificate> - One or more
certificatesblocks as defined below. - id String
- The provider-assigned unique ID for this managed resource.
- key
Vault StringId - The Key Vault ID.
- names List<String>
- List containing names of certificates that exist in this Key Vault.
- include
Pending Boolean
- certificates
Get
Certificates Certificate[] - One or more
certificatesblocks as defined below. - id string
- The provider-assigned unique ID for this managed resource.
- key
Vault stringId - The Key Vault ID.
- names string[]
- List containing names of certificates that exist in this Key Vault.
- include
Pending boolean
- certificates
Sequence[Get
Certificates Certificate] - One or more
certificatesblocks as defined below. - id str
- The provider-assigned unique ID for this managed resource.
- key_
vault_ strid - The Key Vault ID.
- names Sequence[str]
- List containing names of certificates that exist in this Key Vault.
- include_
pending bool
- certificates List<Property Map>
- One or more
certificatesblocks as defined below. - id String
- The provider-assigned unique ID for this managed resource.
- key
Vault StringId - The Key Vault ID.
- names List<String>
- List containing names of certificates that exist in this Key Vault.
- include
Pending Boolean
Supporting Types
GetCertificatesCertificate
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
