We recommend using Azure Native.
Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi
azure.nginx.getCertificate
Explore with Pulumi AI
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.
- Nginx
Deployment stringId - The ID of the NGINX Deployment that the certificate is associated with.
- Name string
- The name of the NGINX Certificate.
- Nginx
Deployment stringId - The ID of the NGINX Deployment that the certificate is associated with.
- name String
- The name of the NGINX Certificate.
- nginx
Deployment StringId - The ID of the NGINX Deployment that the certificate is associated with.
- name string
- The name of the NGINX Certificate.
- nginx
Deployment stringId - The ID of the NGINX Deployment that the certificate is associated with.
- name str
- The name of the NGINX Certificate.
- nginx_
deployment_ strid - The ID of the NGINX Deployment that the certificate is associated with.
- name String
- The name of the NGINX Certificate.
- nginx
Deployment StringId - The ID of the NGINX Deployment that the certificate is associated with.
getCertificate Result
The following output properties are available:
- Certificate
Virtual stringPath - The path to the certificate file of the certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Vault stringSecret Id - The ID of the Key Vault Secret for the certificate.
- Key
Virtual stringPath - The path to the key file of the certificate.
- Name string
- Nginx
Deployment stringId
- Certificate
Virtual stringPath - The path to the certificate file of the certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Vault stringSecret Id - The ID of the Key Vault Secret for the certificate.
- Key
Virtual stringPath - The path to the key file of the certificate.
- Name string
- Nginx
Deployment stringId
- certificate
Virtual StringPath - The path to the certificate file of the certificate.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Vault StringSecret Id - The ID of the Key Vault Secret for the certificate.
- key
Virtual StringPath - The path to the key file of the certificate.
- name String
- nginx
Deployment StringId
- certificate
Virtual stringPath - The path to the certificate file of the certificate.
- id string
- The provider-assigned unique ID for this managed resource.
- key
Vault stringSecret Id - The ID of the Key Vault Secret for the certificate.
- key
Virtual stringPath - The path to the key file of the certificate.
- name string
- nginx
Deployment stringId
- certificate_
virtual_ strpath - The path to the certificate file of the certificate.
- id str
- The provider-assigned unique ID for this managed resource.
- key_
vault_ strsecret_ id - The ID of the Key Vault Secret for the certificate.
- key_
virtual_ strpath - The path to the key file of the certificate.
- name str
- nginx_
deployment_ strid
- certificate
Virtual StringPath - The path to the certificate file of the certificate.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Vault StringSecret Id - The ID of the Key Vault Secret for the certificate.
- key
Virtual StringPath - The path to the key file of the certificate.
- name String
- nginx
Deployment StringId
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.