GetCertificate
Use this data source to access information about an existing Key Vault Certificate.
Note: All arguments including the secret value will be stored in the raw state as plain-text. Read more about sensitive data in state.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleKeyVault = Output.Create(Azure.KeyVault.GetKeyVault.InvokeAsync(new Azure.KeyVault.GetKeyVaultArgs
{
Name = "examplekv",
ResourceGroupName = "some-resource-group",
}));
var exampleCertificate = exampleKeyVault.Apply(exampleKeyVault => Output.Create(Azure.KeyVault.GetCertificate.InvokeAsync(new Azure.KeyVault.GetCertificateArgs
{
Name = "secret-sauce",
KeyVaultId = exampleKeyVault.Id,
})));
this.CertificateThumbprint = exampleCertificate.Apply(exampleCertificate => exampleCertificate.Thumbprint);
}
[Output("certificateThumbprint")]
public Output<string> CertificateThumbprint { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/keyvault"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleKeyVault, err := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{
Name: "examplekv",
ResourceGroupName: "some-resource-group",
}, nil)
if err != nil {
return err
}
exampleCertificate, err := keyvault.LookupCertificate(ctx, &keyvault.LookupCertificateArgs{
Name: "secret-sauce",
KeyVaultId: exampleKeyVault.Id,
}, nil)
if err != nil {
return err
}
ctx.Export("certificateThumbprint", exampleCertificate.Thumbprint)
return nil
})
}import pulumi
import pulumi_azure as azure
example_key_vault = azure.keyvault.get_key_vault(name="examplekv",
resource_group_name="some-resource-group")
example_certificate = azure.keyvault.get_certificate(name="secret-sauce",
key_vault_id=example_key_vault.id)
pulumi.export("certificateThumbprint", example_certificate.thumbprint)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleKeyVault = azure.keyvault.getKeyVault({
name: "examplekv",
resourceGroupName: "some-resource-group",
});
const exampleCertificate = exampleKeyVault.then(exampleKeyVault => azure.keyvault.getCertificate({
name: "secret-sauce",
keyVaultId: exampleKeyVault.id,
}));
export const certificateThumbprint = exampleCertificate.then(exampleCertificate => exampleCertificate.thumbprint);Using GetCertificate
function getCertificate(args: GetCertificateArgs, opts?: InvokeOptions): Promise<GetCertificateResult>function get_certificate(key_vault_id=None, name=None, version=None, opts=None)func LookupCertificate(ctx *Context, args *LookupCertificateArgs, opts ...InvokeOption) (*LookupCertificateResult, error)Note: This function is named
LookupCertificatein the Go SDK.
public static class GetCertificate {
public static Task<GetCertificateResult> InvokeAsync(GetCertificateArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetCertificate Result
The following output properties are available:
- Certificate
Data string - Certificate
Policies List<GetCertificate Certificate Policy> A
certificate_policyblock as defined below.- Id string
The provider-assigned unique ID for this managed resource.
- Key
Vault stringId - Name string
The name of the Certificate Issuer.
- Secret
Id string - Dictionary<string, string>
A mapping of tags to assign to the resource.
- Thumbprint string
- Version string
- Certificate
Data string - Certificate
Policies []GetCertificate Certificate Policy A
certificate_policyblock as defined below.- Id string
The provider-assigned unique ID for this managed resource.
- Key
Vault stringId - Name string
The name of the Certificate Issuer.
- Secret
Id string - map[string]string
A mapping of tags to assign to the resource.
- Thumbprint string
- Version string
- certificate
Data string - certificate
Policies GetCertificate Certificate Policy[] A
certificate_policyblock as defined below.- id string
The provider-assigned unique ID for this managed resource.
- key
Vault stringId - name string
The name of the Certificate Issuer.
- secret
Id string - {[key: string]: string}
A mapping of tags to assign to the resource.
- thumbprint string
- version string
- certificate_
data str - certificate_
policies List[GetCertificate Certificate Policy] A
certificate_policyblock as defined below.- id str
The provider-assigned unique ID for this managed resource.
- key_
vault_ strid - name str
The name of the Certificate Issuer.
- secret_
id str - Dict[str, str]
A mapping of tags to assign to the resource.
- thumbprint str
- version str
Supporting Types
GetCertificateCertificatePolicy
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Issuer
Parameters List<GetCertificate Certificate Policy Issuer Parameter Args> A
issuer_parametersblock as defined below.- Key
Properties List<GetCertificate Certificate Policy Key Property Args> A
key_propertiesblock as defined below.- Secret
Properties List<GetCertificate Certificate Policy Secret Property Args> A
secret_propertiesblock as defined below.- X509Certificate
Properties List<GetCertificate Certificate Policy X509Certificate Property Args> An
x509_certificate_propertiesblock as defined below.- Lifetime
Actions List<GetCertificate Certificate Policy Lifetime Action Args> A
lifetime_actionblock as defined below.
- Issuer
Parameters []GetCertificate Certificate Policy Issuer Parameter A
issuer_parametersblock as defined below.- Key
Properties []GetCertificate Certificate Policy Key Property A
key_propertiesblock as defined below.- Secret
Properties []GetCertificate Certificate Policy Secret Property A
secret_propertiesblock as defined below.- X509Certificate
Properties []GetCertificate Certificate Policy X509Certificate Property An
x509_certificate_propertiesblock as defined below.- Lifetime
Actions []GetCertificate Certificate Policy Lifetime Action A
lifetime_actionblock as defined below.
- issuer
Parameters GetCertificate Certificate Policy Issuer Parameter[] A
issuer_parametersblock as defined below.- key
Properties GetCertificate Certificate Policy Key Property[] A
key_propertiesblock as defined below.- secret
Properties GetCertificate Certificate Policy Secret Property[] A
secret_propertiesblock as defined below.- x509Certificate
Properties GetCertificate Certificate Policy X509Certificate Property[] An
x509_certificate_propertiesblock as defined below.- lifetime
Actions GetCertificate Certificate Policy Lifetime Action[] A
lifetime_actionblock as defined below.
- issuer
Parameters List[GetCertificate Certificate Policy Issuer Parameter] A
issuer_parametersblock as defined below.- key_
properties List[GetCertificate Certificate Policy Key Property] A
key_propertiesblock as defined below.- secret
Properties List[GetCertificate Certificate Policy Secret Property] A
secret_propertiesblock as defined below.- x509Certificate
Properties List[GetCertificate Certificate Policy X509Certificate Property] An
x509_certificate_propertiesblock as defined below.- lifetime
Actions List[GetCertificate Certificate Policy Lifetime Action] A
lifetime_actionblock as defined below.
GetCertificateCertificatePolicyIssuerParameter
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetCertificateCertificatePolicyKeyProperty
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetCertificateCertificatePolicyLifetimeAction
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Actions
List<Get
Certificate Certificate Policy Lifetime Action Action Args> A
actionblock as defined below.- Triggers
List<Get
Certificate Certificate Policy Lifetime Action Trigger Args> A
triggerblock as defined below.
- Actions
[]Get
Certificate Certificate Policy Lifetime Action Action A
actionblock as defined below.- Triggers
[]Get
Certificate Certificate Policy Lifetime Action Trigger A
triggerblock as defined below.
- actions
Get
Certificate Certificate Policy Lifetime Action Action[] A
actionblock as defined below.- triggers
Get
Certificate Certificate Policy Lifetime Action Trigger[] A
triggerblock as defined below.
- actions
List[Get
Certificate Certificate Policy Lifetime Action Action] A
actionblock as defined below.- triggers
List[Get
Certificate Certificate Policy Lifetime Action Trigger] A
triggerblock as defined below.
GetCertificateCertificatePolicyLifetimeActionAction
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Action
Type string The Type of action to be performed when the lifetime trigger is triggerec.
- Action
Type string The Type of action to be performed when the lifetime trigger is triggerec.
- action
Type string The Type of action to be performed when the lifetime trigger is triggerec.
- action
Type str The Type of action to be performed when the lifetime trigger is triggerec.
GetCertificateCertificatePolicyLifetimeActionTrigger
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Days
Before intExpiry The number of days before the Certificate expires that the action associated with this Trigger should run.
- Lifetime
Percentage int The percentage at which during the Certificates Lifetime the action associated with this Trigger should run.
- Days
Before intExpiry The number of days before the Certificate expires that the action associated with this Trigger should run.
- Lifetime
Percentage int The percentage at which during the Certificates Lifetime the action associated with this Trigger should run.
- days
Before numberExpiry The number of days before the Certificate expires that the action associated with this Trigger should run.
- lifetime
Percentage number The percentage at which during the Certificates Lifetime the action associated with this Trigger should run.
- days
Before floatExpiry The number of days before the Certificate expires that the action associated with this Trigger should run.
- lifetime
Percentage float The percentage at which during the Certificates Lifetime the action associated with this Trigger should run.
GetCertificateCertificatePolicySecretProperty
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Content
Type string The Content-Type of the Certificate, for example
application/x-pkcs12for a PFX orapplication/x-pem-filefor a PEM.
- Content
Type string The Content-Type of the Certificate, for example
application/x-pkcs12for a PFX orapplication/x-pem-filefor a PEM.
- content
Type string The Content-Type of the Certificate, for example
application/x-pkcs12for a PFX orapplication/x-pem-filefor a PEM.
- content_
type str The Content-Type of the Certificate, for example
application/x-pkcs12for a PFX orapplication/x-pem-filefor a PEM.
GetCertificateCertificatePolicyX509CertificateProperty
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Extended
Key List<string>Usages A list of Extended/Enhanced Key Usages.
- Key
Usages List<string> A list of uses associated with this Key.
- Subject string
The Certificate’s Subject.
- Subject
Alternative List<GetNames Certificate Certificate Policy X509Certificate Property Subject Alternative Name Args> A
subject_alternative_namesblock as defined below.- Validity
In intMonths The Certificates Validity Period in Months.
- Extended
Key []stringUsages A list of Extended/Enhanced Key Usages.
- Key
Usages []string A list of uses associated with this Key.
- Subject string
The Certificate’s Subject.
- Subject
Alternative []GetNames Certificate Certificate Policy X509Certificate Property Subject Alternative Name A
subject_alternative_namesblock as defined below.- Validity
In intMonths The Certificates Validity Period in Months.
- extended
Key string[]Usages A list of Extended/Enhanced Key Usages.
- key
Usages string[] A list of uses associated with this Key.
- subject string
The Certificate’s Subject.
- subject
Alternative GetNames Certificate Certificate Policy X509Certificate Property Subject Alternative Name[] A
subject_alternative_namesblock as defined below.- validity
In numberMonths The Certificates Validity Period in Months.
- extended
Key List[str]Usages A list of Extended/Enhanced Key Usages.
- key
Usages List[str] A list of uses associated with this Key.
- subject str
The Certificate’s Subject.
- subject
Alternative List[GetNames Certificate Certificate Policy X509Certificate Property Subject Alternative Name] A
subject_alternative_namesblock as defined below.- validity
In floatMonths The Certificates Validity Period in Months.
GetCertificateCertificatePolicyX509CertificatePropertySubjectAlternativeName
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Dns
Names List<string> A list of alternative DNS names (FQDNs) identified by the Certificate.
- Emails List<string>
A list of email addresses identified by this Certificate.
- Upns List<string>
A list of User Principal Names identified by the Certificate.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.