1. Packages
  2. Azure Classic
  3. API Docs
  4. nginx
  5. getCertificate

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.nginx.getCertificate

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Use this data source to access information about an existing NGINX Certificate.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.nginx.getCertificate({
        name: "existing",
        nginxDeploymentId: exampleAzurermNginxDeployment.id,
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.nginx.get_certificate(name="existing",
        nginx_deployment_id=example_azurerm_nginx_deployment["id"])
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/nginx"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := nginx.LookupCertificate(ctx, &nginx.LookupCertificateArgs{
    			Name:              "existing",
    			NginxDeploymentId: exampleAzurermNginxDeployment.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Nginx.GetCertificate.Invoke(new()
        {
            Name = "existing",
            NginxDeploymentId = exampleAzurermNginxDeployment.Id,
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getCertificateResult => getCertificateResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.nginx.NginxFunctions;
    import com.pulumi.azure.nginx.inputs.GetCertificateArgs;
    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 = NginxFunctions.getCertificate(GetCertificateArgs.builder()
                .name("existing")
                .nginxDeploymentId(exampleAzurermNginxDeployment.id())
                .build());
    
            ctx.export("id", example.applyValue(getCertificateResult -> getCertificateResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:nginx:getCertificate
          Arguments:
            name: existing
            nginxDeploymentId: ${exampleAzurermNginxDeployment.id}
    outputs:
      id: ${example.id}
    

    Using getCertificate

    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 getCertificate(args: GetCertificateArgs, opts?: InvokeOptions): Promise<GetCertificateResult>
    function getCertificateOutput(args: GetCertificateOutputArgs, opts?: InvokeOptions): Output<GetCertificateResult>
    def get_certificate(name: Optional[str] = None,
                        nginx_deployment_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetCertificateResult
    def get_certificate_output(name: Optional[pulumi.Input[str]] = None,
                        nginx_deployment_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetCertificateResult]
    func LookupCertificate(ctx *Context, args *LookupCertificateArgs, opts ...InvokeOption) (*LookupCertificateResult, error)
    func LookupCertificateOutput(ctx *Context, args *LookupCertificateOutputArgs, opts ...InvokeOption) LookupCertificateResultOutput

    > Note: This function is named LookupCertificate in the Go SDK.

    public static class GetCertificate 
    {
        public static Task<GetCertificateResult> InvokeAsync(GetCertificateArgs args, InvokeOptions? opts = null)
        public static Output<GetCertificateResult> Invoke(GetCertificateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCertificateResult> getCertificate(GetCertificateArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:nginx/getCertificate:getCertificate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the NGINX Certificate.
    NginxDeploymentId string
    The ID of the NGINX Deployment that the certificate is associated with.
    Name string
    The name of the NGINX Certificate.
    NginxDeploymentId string
    The ID of the NGINX Deployment that the certificate is associated with.
    name String
    The name of the NGINX Certificate.
    nginxDeploymentId String
    The ID of the NGINX Deployment that the certificate is associated with.
    name string
    The name of the NGINX Certificate.
    nginxDeploymentId string
    The ID of the NGINX Deployment that the certificate is associated with.
    name str
    The name of the NGINX Certificate.
    nginx_deployment_id str
    The ID of the NGINX Deployment that the certificate is associated with.
    name String
    The name of the NGINX Certificate.
    nginxDeploymentId String
    The ID of the NGINX Deployment that the certificate is associated with.

    getCertificate Result

    The following output properties are available:

    CertificateVirtualPath string
    The path to the certificate file of the certificate.
    ErrorCode string
    The error code of the certificate error, if any.
    ErrorMessage string
    The error message of the certificate error, if any.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyVaultSecretCreationDate string
    The date/time the certificate was created in Azure Key Vault.
    KeyVaultSecretId string
    The ID of the Key Vault Secret for the certificate.
    KeyVaultSecretVersion string
    The version of the certificate.
    KeyVirtualPath string
    The path to the key file of the certificate.
    Name string
    NginxDeploymentId string
    Sha1Thumbprint string
    The SHA-1 thumbprint of the certificate.
    CertificateVirtualPath string
    The path to the certificate file of the certificate.
    ErrorCode string
    The error code of the certificate error, if any.
    ErrorMessage string
    The error message of the certificate error, if any.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyVaultSecretCreationDate string
    The date/time the certificate was created in Azure Key Vault.
    KeyVaultSecretId string
    The ID of the Key Vault Secret for the certificate.
    KeyVaultSecretVersion string
    The version of the certificate.
    KeyVirtualPath string
    The path to the key file of the certificate.
    Name string
    NginxDeploymentId string
    Sha1Thumbprint string
    The SHA-1 thumbprint of the certificate.
    certificateVirtualPath String
    The path to the certificate file of the certificate.
    errorCode String
    The error code of the certificate error, if any.
    errorMessage String
    The error message of the certificate error, if any.
    id String
    The provider-assigned unique ID for this managed resource.
    keyVaultSecretCreationDate String
    The date/time the certificate was created in Azure Key Vault.
    keyVaultSecretId String
    The ID of the Key Vault Secret for the certificate.
    keyVaultSecretVersion String
    The version of the certificate.
    keyVirtualPath String
    The path to the key file of the certificate.
    name String
    nginxDeploymentId String
    sha1Thumbprint String
    The SHA-1 thumbprint of the certificate.
    certificateVirtualPath string
    The path to the certificate file of the certificate.
    errorCode string
    The error code of the certificate error, if any.
    errorMessage string
    The error message of the certificate error, if any.
    id string
    The provider-assigned unique ID for this managed resource.
    keyVaultSecretCreationDate string
    The date/time the certificate was created in Azure Key Vault.
    keyVaultSecretId string
    The ID of the Key Vault Secret for the certificate.
    keyVaultSecretVersion string
    The version of the certificate.
    keyVirtualPath string
    The path to the key file of the certificate.
    name string
    nginxDeploymentId string
    sha1Thumbprint string
    The SHA-1 thumbprint of the certificate.
    certificate_virtual_path str
    The path to the certificate file of the certificate.
    error_code str
    The error code of the certificate error, if any.
    error_message str
    The error message of the certificate error, if any.
    id str
    The provider-assigned unique ID for this managed resource.
    key_vault_secret_creation_date str
    The date/time the certificate was created in Azure Key Vault.
    key_vault_secret_id str
    The ID of the Key Vault Secret for the certificate.
    key_vault_secret_version str
    The version of the certificate.
    key_virtual_path str
    The path to the key file of the certificate.
    name str
    nginx_deployment_id str
    sha1_thumbprint str
    The SHA-1 thumbprint of the certificate.
    certificateVirtualPath String
    The path to the certificate file of the certificate.
    errorCode String
    The error code of the certificate error, if any.
    errorMessage String
    The error message of the certificate error, if any.
    id String
    The provider-assigned unique ID for this managed resource.
    keyVaultSecretCreationDate String
    The date/time the certificate was created in Azure Key Vault.
    keyVaultSecretId String
    The ID of the Key Vault Secret for the certificate.
    keyVaultSecretVersion String
    The version of the certificate.
    keyVirtualPath String
    The path to the key file of the certificate.
    name String
    nginxDeploymentId String
    sha1Thumbprint String
    The SHA-1 thumbprint of the certificate.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi