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

We recommend using Azure Native.

Azure Classic v5.74.0 published on Monday, Apr 29, 2024 by Pulumi

azure.nginx.getCertificate

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.74.0 published on Monday, Apr 29, 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/v5/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.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyVaultSecretId string
    The ID of the Key Vault Secret for the certificate.
    KeyVirtualPath string
    The path to the key file of the certificate.
    Name string
    NginxDeploymentId string
    CertificateVirtualPath string
    The path to the certificate file of the certificate.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyVaultSecretId string
    The ID of the Key Vault Secret for the certificate.
    KeyVirtualPath string
    The path to the key file of the certificate.
    Name string
    NginxDeploymentId string
    certificateVirtualPath String
    The path to the certificate file of the certificate.
    id String
    The provider-assigned unique ID for this managed resource.
    keyVaultSecretId String
    The ID of the Key Vault Secret for the certificate.
    keyVirtualPath String
    The path to the key file of the certificate.
    name String
    nginxDeploymentId String
    certificateVirtualPath string
    The path to the certificate file of the certificate.
    id string
    The provider-assigned unique ID for this managed resource.
    keyVaultSecretId string
    The ID of the Key Vault Secret for the certificate.
    keyVirtualPath string
    The path to the key file of the certificate.
    name string
    nginxDeploymentId string
    certificate_virtual_path str
    The path to the certificate file of the certificate.
    id str
    The provider-assigned unique ID for this managed resource.
    key_vault_secret_id str
    The ID of the Key Vault Secret for the certificate.
    key_virtual_path str
    The path to the key file of the certificate.
    name str
    nginx_deployment_id str
    certificateVirtualPath String
    The path to the certificate file of the certificate.
    id String
    The provider-assigned unique ID for this managed resource.
    keyVaultSecretId String
    The ID of the Key Vault Secret for the certificate.
    keyVirtualPath String
    The path to the key file of the certificate.
    name String
    nginxDeploymentId String

    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 Classic v5.74.0 published on Monday, Apr 29, 2024 by Pulumi