1. Packages
  2. F5bigip Provider
  3. API Docs
  4. ssl
  5. Key
f5 BIG-IP v3.17.10 published on Tuesday, Apr 8, 2025 by Pulumi

f5bigip.ssl.Key

Explore with Pulumi AI

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

import * as pulumi from "@pulumi/pulumi";
import * as f5bigip from "@pulumi/f5bigip";
import * as std from "@pulumi/std";

const test_key = new f5bigip.ssl.Key("test-key", {
    name: "serverkey.key",
    content: std.file({
        input: "serverkey.key",
    }).then(invoke => invoke.result),
    partition: "Common",
});
Copy
import pulumi
import pulumi_f5bigip as f5bigip
import pulumi_std as std

test_key = f5bigip.ssl.Key("test-key",
    name="serverkey.key",
    content=std.file(input="serverkey.key").result,
    partition="Common")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		invokeFile, err := std.File(ctx, &std.FileArgs{
			Input: "serverkey.key",
		}, nil)
		if err != nil {
			return err
		}
		_, err = ssl.NewKey(ctx, "test-key", &ssl.KeyArgs{
			Name:      pulumi.String("serverkey.key"),
			Content:   pulumi.String(invokeFile.Result),
			Partition: pulumi.String("Common"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using F5BigIP = Pulumi.F5BigIP;
using Std = Pulumi.Std;

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

});
Copy
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(StdFunctions.file(FileArgs.builder()
                .input("serverkey.key")
                .build()).result())
            .partition("Common")
            .build());

    }
}
Copy
resources:
  test-key:
    type: f5bigip:ssl:Key
    properties:
      name: serverkey.key
      content:
        fn::invoke:
          function: std:file
          arguments:
            input: serverkey.key
          return: result
      partition: Common
Copy

Create Key Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Key(name: string, args: KeyArgs, opts?: CustomResourceOptions);
@overload
def Key(resource_name: str,
        args: KeyArgs,
        opts: Optional[ResourceOptions] = None)

@overload
def Key(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        content: Optional[str] = None,
        name: Optional[str] = None,
        full_path: Optional[str] = None,
        partition: Optional[str] = None,
        passphrase: Optional[str] = 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.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. KeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. KeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. KeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. KeyArgs
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 keyResource = new F5BigIP.Ssl.Key("keyResource", new()
{
    Content = "string",
    Name = "string",
    FullPath = "string",
    Partition = "string",
    Passphrase = "string",
});
Copy
example, err := ssl.NewKey(ctx, "keyResource", &ssl.KeyArgs{
	Content:    pulumi.String("string"),
	Name:       pulumi.String("string"),
	FullPath:   pulumi.String("string"),
	Partition:  pulumi.String("string"),
	Passphrase: pulumi.String("string"),
})
Copy
var keyResource = new Key("keyResource", KeyArgs.builder()
    .content("string")
    .name("string")
    .fullPath("string")
    .partition("string")
    .passphrase("string")
    .build());
Copy
key_resource = f5bigip.ssl.Key("keyResource",
    content="string",
    name="string",
    full_path="string",
    partition="string",
    passphrase="string")
Copy
const keyResource = new f5bigip.ssl.Key("keyResource", {
    content: "string",
    name: "string",
    fullPath: "string",
    partition: "string",
    passphrase: "string",
});
Copy
type: f5bigip:ssl:Key
properties:
    content: string
    fullPath: string
    name: string
    partition: string
    passphrase: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Key resource accepts the following input properties:

Content This property is required. string
Content of SSL certificate key present on local Disk
Name
This property is required.
Changes to this property will trigger replacement.
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 This property is required. string
Content of SSL certificate key present on local Disk
Name
This property is required.
Changes to this property will trigger replacement.
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 This property is required. String
Content of SSL certificate key present on local Disk
name
This property is required.
Changes to this property will trigger replacement.
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 This property is required. string
Content of SSL certificate key present on local Disk
name
This property is required.
Changes to this property will trigger replacement.
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 This property is required. str
Content of SSL certificate key present on local Disk
name
This property is required.
Changes to this property will trigger replacement.
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 This property is required. String
Content of SSL certificate key present on local Disk
name
This property is required.
Changes to this property will trigger replacement.
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)
resources:  _:    type: f5bigip:ssl:Key    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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.