nexus 2.6.0 published on Thursday, May 8, 2025 by datadrivers
nexus.getSecuritySsl
Use this data source to retrieve a SSL certificate from any Nexus-external hostvia Nexus. This resource does NOT retrieve a certificate from the Nexus truststore
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nexus from "@pulumi/nexus";
const ldapCertSecuritySsl = nexus.getSecuritySsl({
    host: "google.de",
    port: 443,
});
// Import Cert into Nexus
const ldapCertSecuritySslTruststore = new nexus.SecuritySslTruststore("ldapCertSecuritySslTruststore", {pem: ldapCertSecuritySsl.then(ldapCertSecuritySsl => ldapCertSecuritySsl.pem)});
import pulumi
import pulumi_nexus as nexus
ldap_cert_security_ssl = nexus.get_security_ssl(host="google.de",
    port=443)
# Import Cert into Nexus
ldap_cert_security_ssl_truststore = nexus.SecuritySslTruststore("ldapCertSecuritySslTruststore", pem=ldap_cert_security_ssl.pem)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ldapCertSecuritySsl, err := nexus.GetSecuritySsl(ctx, &nexus.GetSecuritySslArgs{
			Host: "google.de",
			Port: pulumi.Float64Ref(443),
		}, nil)
		if err != nil {
			return err
		}
		// Import Cert into Nexus
		_, err = nexus.NewSecuritySslTruststore(ctx, "ldapCertSecuritySslTruststore", &nexus.SecuritySslTruststoreArgs{
			Pem: pulumi.String(ldapCertSecuritySsl.Pem),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nexus = Pulumi.Nexus;
return await Deployment.RunAsync(() => 
{
    var ldapCertSecuritySsl = Nexus.GetSecuritySsl.Invoke(new()
    {
        Host = "google.de",
        Port = 443,
    });
    // Import Cert into Nexus
    var ldapCertSecuritySslTruststore = new Nexus.SecuritySslTruststore("ldapCertSecuritySslTruststore", new()
    {
        Pem = ldapCertSecuritySsl.Apply(getSecuritySslResult => getSecuritySslResult.Pem),
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nexus.NexusFunctions;
import com.pulumi.nexus.inputs.GetSecuritySslArgs;
import com.pulumi.nexus.SecuritySslTruststore;
import com.pulumi.nexus.SecuritySslTruststoreArgs;
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 ldapCertSecuritySsl = NexusFunctions.getSecuritySsl(GetSecuritySslArgs.builder()
            .host("google.de")
            .port(443)
            .build());
        // Import Cert into Nexus
        var ldapCertSecuritySslTruststore = new SecuritySslTruststore("ldapCertSecuritySslTruststore", SecuritySslTruststoreArgs.builder()
            .pem(ldapCertSecuritySsl.applyValue(getSecuritySslResult -> getSecuritySslResult.pem()))
            .build());
    }
}
resources:
  # Import Cert into Nexus
  ldapCertSecuritySslTruststore:
    type: nexus:SecuritySslTruststore
    properties:
      pem: ${ldapCertSecuritySsl.pem}
variables:
  ldapCertSecuritySsl:
    fn::invoke:
      function: nexus:getSecuritySsl
      arguments:
        host: google.de
        port: 443
Using getSecuritySsl
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 getSecuritySsl(args: GetSecuritySslArgs, opts?: InvokeOptions): Promise<GetSecuritySslResult>
function getSecuritySslOutput(args: GetSecuritySslOutputArgs, opts?: InvokeOptions): Output<GetSecuritySslResult>def get_security_ssl(host: Optional[str] = None,
                     port: Optional[float] = None,
                     opts: Optional[InvokeOptions] = None) -> GetSecuritySslResult
def get_security_ssl_output(host: Optional[pulumi.Input[str]] = None,
                     port: Optional[pulumi.Input[float]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetSecuritySslResult]func GetSecuritySsl(ctx *Context, args *GetSecuritySslArgs, opts ...InvokeOption) (*GetSecuritySslResult, error)
func GetSecuritySslOutput(ctx *Context, args *GetSecuritySslOutputArgs, opts ...InvokeOption) GetSecuritySslResultOutput> Note: This function is named GetSecuritySsl in the Go SDK.
public static class GetSecuritySsl 
{
    public static Task<GetSecuritySslResult> InvokeAsync(GetSecuritySslArgs args, InvokeOptions? opts = null)
    public static Output<GetSecuritySslResult> Invoke(GetSecuritySslInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecuritySslResult> getSecuritySsl(GetSecuritySslArgs args, InvokeOptions options)
public static Output<GetSecuritySslResult> getSecuritySsl(GetSecuritySslArgs args, InvokeOptions options)
fn::invoke:
  function: nexus:index/getSecuritySsl:getSecuritySsl
  arguments:
    # arguments dictionaryThe following arguments are supported:
getSecuritySsl Result
The following output properties are available:
- Expires
On double - expiresOn field of the retrieved cert
 - Fingerprint string
 - fingerprint field of the retrieved cert
 - Host string
 - Hostname for looking up certificate
 - Id string
 - Used to identify data source at nexus
 - Issued
On double - issuedOn field of the retrieved cert
 - Issuer
Common stringName  - issuerCommonName field of the retrieved cert
 - Issuer
Organization string - issuerOrganization field of the retrieved cert
 - Issuer
Organization stringUnit  - issuerOrganizationUnit field of the retrieved cert
 - Pem string
 - pem field of the retrieved cert
 - Serial
Number string - serialNumber field of the retrieved cert
 - Subject
Common stringName  - subjectCommonName field of the retrieved cert
 - Subject
Organization string - subjectOrganization field of the retrieved cert
 - Subject
Organization stringUnit  - subjectOrganizationUnit field of the retrieved cert
 - Port double
 - Port for looking up certificate
 
- Expires
On float64 - expiresOn field of the retrieved cert
 - Fingerprint string
 - fingerprint field of the retrieved cert
 - Host string
 - Hostname for looking up certificate
 - Id string
 - Used to identify data source at nexus
 - Issued
On float64 - issuedOn field of the retrieved cert
 - Issuer
Common stringName  - issuerCommonName field of the retrieved cert
 - Issuer
Organization string - issuerOrganization field of the retrieved cert
 - Issuer
Organization stringUnit  - issuerOrganizationUnit field of the retrieved cert
 - Pem string
 - pem field of the retrieved cert
 - Serial
Number string - serialNumber field of the retrieved cert
 - Subject
Common stringName  - subjectCommonName field of the retrieved cert
 - Subject
Organization string - subjectOrganization field of the retrieved cert
 - Subject
Organization stringUnit  - subjectOrganizationUnit field of the retrieved cert
 - Port float64
 - Port for looking up certificate
 
- expires
On Double - expiresOn field of the retrieved cert
 - fingerprint String
 - fingerprint field of the retrieved cert
 - host String
 - Hostname for looking up certificate
 - id String
 - Used to identify data source at nexus
 - issued
On Double - issuedOn field of the retrieved cert
 - issuer
Common StringName  - issuerCommonName field of the retrieved cert
 - issuer
Organization String - issuerOrganization field of the retrieved cert
 - issuer
Organization StringUnit  - issuerOrganizationUnit field of the retrieved cert
 - pem String
 - pem field of the retrieved cert
 - serial
Number String - serialNumber field of the retrieved cert
 - subject
Common StringName  - subjectCommonName field of the retrieved cert
 - subject
Organization String - subjectOrganization field of the retrieved cert
 - subject
Organization StringUnit  - subjectOrganizationUnit field of the retrieved cert
 - port Double
 - Port for looking up certificate
 
- expires
On number - expiresOn field of the retrieved cert
 - fingerprint string
 - fingerprint field of the retrieved cert
 - host string
 - Hostname for looking up certificate
 - id string
 - Used to identify data source at nexus
 - issued
On number - issuedOn field of the retrieved cert
 - issuer
Common stringName  - issuerCommonName field of the retrieved cert
 - issuer
Organization string - issuerOrganization field of the retrieved cert
 - issuer
Organization stringUnit  - issuerOrganizationUnit field of the retrieved cert
 - pem string
 - pem field of the retrieved cert
 - serial
Number string - serialNumber field of the retrieved cert
 - subject
Common stringName  - subjectCommonName field of the retrieved cert
 - subject
Organization string - subjectOrganization field of the retrieved cert
 - subject
Organization stringUnit  - subjectOrganizationUnit field of the retrieved cert
 - port number
 - Port for looking up certificate
 
- expires_
on float - expiresOn field of the retrieved cert
 - fingerprint str
 - fingerprint field of the retrieved cert
 - host str
 - Hostname for looking up certificate
 - id str
 - Used to identify data source at nexus
 - issued_
on float - issuedOn field of the retrieved cert
 - issuer_
common_ strname  - issuerCommonName field of the retrieved cert
 - issuer_
organization str - issuerOrganization field of the retrieved cert
 - issuer_
organization_ strunit  - issuerOrganizationUnit field of the retrieved cert
 - pem str
 - pem field of the retrieved cert
 - serial_
number str - serialNumber field of the retrieved cert
 - subject_
common_ strname  - subjectCommonName field of the retrieved cert
 - subject_
organization str - subjectOrganization field of the retrieved cert
 - subject_
organization_ strunit  - subjectOrganizationUnit field of the retrieved cert
 - port float
 - Port for looking up certificate
 
- expires
On Number - expiresOn field of the retrieved cert
 - fingerprint String
 - fingerprint field of the retrieved cert
 - host String
 - Hostname for looking up certificate
 - id String
 - Used to identify data source at nexus
 - issued
On Number - issuedOn field of the retrieved cert
 - issuer
Common StringName  - issuerCommonName field of the retrieved cert
 - issuer
Organization String - issuerOrganization field of the retrieved cert
 - issuer
Organization StringUnit  - issuerOrganizationUnit field of the retrieved cert
 - pem String
 - pem field of the retrieved cert
 - serial
Number String - serialNumber field of the retrieved cert
 - subject
Common StringName  - subjectCommonName field of the retrieved cert
 - subject
Organization String - subjectOrganization field of the retrieved cert
 - subject
Organization StringUnit  - subjectOrganizationUnit field of the retrieved cert
 - port Number
 - Port for looking up certificate
 
Package Details
- Repository
 - nexus datadrivers/terraform-provider-nexus
 - License
 - Notes
 - This Pulumi package is based on the 
nexusTerraform Provider. 
