f5bigip logo
f5 BIG-IP v3.11.0, Mar 21 23

f5bigip.ssl.Key

f5bigip.ssl.Key This resource will import SSL certificate key on BIG-IP LTM. Certificate key can be imported from certificate key files on the local disk, in PEM format

Example Usage

using System.Collections.Generic;
using System.IO;
using Pulumi;
using F5BigIP = Pulumi.F5BigIP;

return await Deployment.RunAsync(() => 
{
    var test_key = new F5BigIP.Ssl.Key("test-key", new()
    {
        Name = "serverkey.key",
        Content = File.ReadAllText("serverkey.key"),
        Partition = "Common",
    });

});
package main

import (
	"os"

	"github.com/pulumi/pulumi-f5bigip/sdk/v3/go/f5bigip/ssl"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := os.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ssl.NewKey(ctx, "test-key", &ssl.KeyArgs{
			Name:      pulumi.String("serverkey.key"),
			Content:   readFileOrPanic("serverkey.key"),
			Partition: pulumi.String("Common"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.f5bigip.ssl.Key;
import com.pulumi.f5bigip.ssl.KeyArgs;
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) {
        var test_key = new Key("test-key", KeyArgs.builder()        
            .name("serverkey.key")
            .content(Files.readString(Paths.get("serverkey.key")))
            .partition("Common")
            .build());

    }
}
import pulumi
import pulumi_f5bigip as f5bigip

test_key = f5bigip.ssl.Key("test-key",
    name="serverkey.key",
    content=(lambda path: open(path).read())("serverkey.key"),
    partition="Common")
import * as pulumi from "@pulumi/pulumi";
import * as f5bigip from "@pulumi/f5bigip";
import * as fs from "fs";

const test_key = new f5bigip.ssl.Key("test-key", {
    name: "serverkey.key",
    content: fs.readFileSync("serverkey.key"),
    partition: "Common",
});
resources:
  test-key:
    type: f5bigip:ssl:Key
    properties:
      name: serverkey.key
      content:
        fn::readFile: serverkey.key
      partition: Common

Create Key Resource

new Key(name: string, args: KeyArgs, opts?: CustomResourceOptions);
@overload
def Key(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        content: Optional[str] = None,
        full_path: Optional[str] = None,
        name: Optional[str] = None,
        partition: Optional[str] = None,
        passphrase: Optional[str] = None)
@overload
def Key(resource_name: str,
        args: KeyArgs,
        opts: Optional[ResourceOptions] = None)
func NewKey(ctx *Context, name string, args KeyArgs, opts ...ResourceOption) (*Key, error)
public Key(string name, KeyArgs args, CustomResourceOptions? opts = null)
public Key(String name, KeyArgs args)
public Key(String name, KeyArgs args, CustomResourceOptions options)
type: f5bigip:ssl:Key
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args KeyArgs
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 KeyArgs
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 KeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args KeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args KeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Key Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Key resource accepts the following input properties:

Content string

Content of SSL certificate key present on local Disk

Name string

Name of the SSL Certificate key to be Imported on to BIGIP

FullPath string

Full Path Name of ssl key

Partition string

Partition of ssl certificate key

Passphrase string

Passphrase on key.

Content string

Content of SSL certificate key present on local Disk

Name string

Name of the SSL Certificate key to be Imported on to BIGIP

FullPath string

Full Path Name of ssl key

Partition string

Partition of ssl certificate key

Passphrase string

Passphrase on key.

content String

Content of SSL certificate key present on local Disk

name String

Name of the SSL Certificate key to be Imported on to BIGIP

fullPath String

Full Path Name of ssl key

partition String

Partition of ssl certificate key

passphrase String

Passphrase on key.

content string

Content of SSL certificate key present on local Disk

name string

Name of the SSL Certificate key to be Imported on to BIGIP

fullPath string

Full Path Name of ssl key

partition string

Partition of ssl certificate key

passphrase string

Passphrase on key.

content str

Content of SSL certificate key present on local Disk

name str

Name of the SSL Certificate key to be Imported on to BIGIP

full_path str

Full Path Name of ssl key

partition str

Partition of ssl certificate key

passphrase str

Passphrase on key.

content String

Content of SSL certificate key present on local Disk

name String

Name of the SSL Certificate key to be Imported on to BIGIP

fullPath String

Full Path Name of ssl key

partition String

Partition of ssl certificate key

passphrase String

Passphrase on key.

Outputs

All input properties are implicitly available as output properties. Additionally, the Key resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Key Resource

Get an existing Key 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?: KeyState, opts?: CustomResourceOptions): Key
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        content: Optional[str] = None,
        full_path: Optional[str] = None,
        name: Optional[str] = None,
        partition: Optional[str] = None,
        passphrase: Optional[str] = None) -> Key
func GetKey(ctx *Context, name string, id IDInput, state *KeyState, opts ...ResourceOption) (*Key, error)
public static Key Get(string name, Input<string> id, KeyState? state, CustomResourceOptions? opts = null)
public static Key get(String name, Output<String> id, KeyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
Content string

Content of SSL certificate key present on local Disk

FullPath string

Full Path Name of ssl key

Name string

Name of the SSL Certificate key to be Imported on to BIGIP

Partition string

Partition of ssl certificate key

Passphrase string

Passphrase on key.

Content string

Content of SSL certificate key present on local Disk

FullPath string

Full Path Name of ssl key

Name string

Name of the SSL Certificate key to be Imported on to BIGIP

Partition string

Partition of ssl certificate key

Passphrase string

Passphrase on key.

content String

Content of SSL certificate key present on local Disk

fullPath String

Full Path Name of ssl key

name String

Name of the SSL Certificate key to be Imported on to BIGIP

partition String

Partition of ssl certificate key

passphrase String

Passphrase on key.

content string

Content of SSL certificate key present on local Disk

fullPath string

Full Path Name of ssl key

name string

Name of the SSL Certificate key to be Imported on to BIGIP

partition string

Partition of ssl certificate key

passphrase string

Passphrase on key.

content str

Content of SSL certificate key present on local Disk

full_path str

Full Path Name of ssl key

name str

Name of the SSL Certificate key to be Imported on to BIGIP

partition str

Partition of ssl certificate key

passphrase str

Passphrase on key.

content String

Content of SSL certificate key present on local Disk

fullPath String

Full Path Name of ssl key

name String

Name of the SSL Certificate key to be Imported on to BIGIP

partition String

Partition of ssl certificate key

passphrase String

Passphrase on key.

Package Details

Repository
f5 BIG-IP pulumi/pulumi-f5bigip
License
Apache-2.0
Notes

This Pulumi package is based on the bigip Terraform Provider.