nexus.SecuritySslTruststore
Explore with Pulumi AI
Use this resource to add an SSL certificate to 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
Create SecuritySslTruststore Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecuritySslTruststore(name: string, args: SecuritySslTruststoreArgs, opts?: CustomResourceOptions);
@overload
def SecuritySslTruststore(resource_name: str,
args: SecuritySslTruststoreArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecuritySslTruststore(resource_name: str,
opts: Optional[ResourceOptions] = None,
pem: Optional[str] = None)
func NewSecuritySslTruststore(ctx *Context, name string, args SecuritySslTruststoreArgs, opts ...ResourceOption) (*SecuritySslTruststore, error)
public SecuritySslTruststore(string name, SecuritySslTruststoreArgs args, CustomResourceOptions? opts = null)
public SecuritySslTruststore(String name, SecuritySslTruststoreArgs args)
public SecuritySslTruststore(String name, SecuritySslTruststoreArgs args, CustomResourceOptions options)
type: nexus:SecuritySslTruststore
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SecuritySslTruststoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecuritySslTruststoreArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecuritySslTruststoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecuritySslTruststoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecuritySslTruststoreArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var securitySslTruststoreResource = new Nexus.SecuritySslTruststore("securitySslTruststoreResource", new()
{
Pem = "string",
});
example, err := nexus.NewSecuritySslTruststore(ctx, "securitySslTruststoreResource", &nexus.SecuritySslTruststoreArgs{
Pem: pulumi.String("string"),
})
var securitySslTruststoreResource = new SecuritySslTruststore("securitySslTruststoreResource", SecuritySslTruststoreArgs.builder()
.pem("string")
.build());
security_ssl_truststore_resource = nexus.SecuritySslTruststore("securitySslTruststoreResource", pem="string")
const securitySslTruststoreResource = new nexus.SecuritySslTruststore("securitySslTruststoreResource", {pem: "string"});
type: nexus:SecuritySslTruststore
properties:
pem: string
SecuritySslTruststore Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SecuritySslTruststore resource accepts the following input properties:
- Pem string
- The cert in PEM format
- Pem string
- The cert in PEM format
- pem String
- The cert in PEM format
- pem string
- The cert in PEM format
- pem str
- The cert in PEM format
- pem String
- The cert in PEM format
Outputs
All input properties are implicitly available as output properties. Additionally, the SecuritySslTruststore resource produces the following output properties:
- Fingerprint string
- The fingerprint of the cert
- Id string
- The provider-assigned unique ID for this managed resource.
- Fingerprint string
- The fingerprint of the cert
- Id string
- The provider-assigned unique ID for this managed resource.
- fingerprint String
- The fingerprint of the cert
- id String
- The provider-assigned unique ID for this managed resource.
- fingerprint string
- The fingerprint of the cert
- id string
- The provider-assigned unique ID for this managed resource.
- fingerprint str
- The fingerprint of the cert
- id str
- The provider-assigned unique ID for this managed resource.
- fingerprint String
- The fingerprint of the cert
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SecuritySslTruststore Resource
Get an existing SecuritySslTruststore resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SecuritySslTruststoreState, opts?: CustomResourceOptions): SecuritySslTruststore
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
fingerprint: Optional[str] = None,
pem: Optional[str] = None) -> SecuritySslTruststore
func GetSecuritySslTruststore(ctx *Context, name string, id IDInput, state *SecuritySslTruststoreState, opts ...ResourceOption) (*SecuritySslTruststore, error)
public static SecuritySslTruststore Get(string name, Input<string> id, SecuritySslTruststoreState? state, CustomResourceOptions? opts = null)
public static SecuritySslTruststore get(String name, Output<String> id, SecuritySslTruststoreState state, CustomResourceOptions options)
resources: _: type: nexus:SecuritySslTruststore get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Fingerprint string
- The fingerprint of the cert
- Pem string
- The cert in PEM format
- Fingerprint string
- The fingerprint of the cert
- Pem string
- The cert in PEM format
- fingerprint String
- The fingerprint of the cert
- pem String
- The cert in PEM format
- fingerprint string
- The fingerprint of the cert
- pem string
- The cert in PEM format
- fingerprint str
- The fingerprint of the cert
- pem str
- The cert in PEM format
- fingerprint String
- The fingerprint of the cert
- pem String
- The cert in PEM format
Package Details
- Repository
- nexus datadrivers/terraform-provider-nexus
- License
- Notes
- This Pulumi package is based on the
nexus
Terraform Provider.