Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

SshKey

Provides a Linode SSH Key resource. This can be used to create, modify, and delete Linodes SSH Keys. Managed SSH Keys allow instances to be created with a list of Linode usernames, whose SSH keys will be automatically applied to the root account’s ~/.ssh/authorized_keys file. For more information, see the Linode APIv4 docs.

Attributes

This resource exports the following attributes:

  • created - The date this SSH Key was created.

Create a SshKey Resource

new SshKey(name: string, args: SshKeyArgs, opts?: CustomResourceOptions);
@overload
def SshKey(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           label: Optional[str] = None,
           ssh_key: Optional[str] = None)
@overload
def SshKey(resource_name: str,
           args: SshKeyArgs,
           opts: Optional[ResourceOptions] = None)
func NewSshKey(ctx *Context, name string, args SshKeyArgs, opts ...ResourceOption) (*SshKey, error)
public SshKey(string name, SshKeyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args SshKeyArgs
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 SshKeyArgs
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 SshKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SshKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

SshKey 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 SshKey resource accepts the following input properties:

Label string
A label for the SSH Key.
SshKeyName string
The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.
Label string
A label for the SSH Key.
SshKey string
The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.
label string
A label for the SSH Key.
sshKey string
The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.
label str
A label for the SSH Key.
ssh_key str
The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.

Outputs

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

Created string
The date this key was added.
Id string
The provider-assigned unique ID for this managed resource.
Created string
The date this key was added.
Id string
The provider-assigned unique ID for this managed resource.
created string
The date this key was added.
id string
The provider-assigned unique ID for this managed resource.
created str
The date this key was added.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing SshKey Resource

Get an existing SshKey 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?: SshKeyState, opts?: CustomResourceOptions): SshKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created: Optional[str] = None,
        label: Optional[str] = None,
        ssh_key: Optional[str] = None) -> SshKey
func GetSshKey(ctx *Context, name string, id IDInput, state *SshKeyState, opts ...ResourceOption) (*SshKey, error)
public static SshKey Get(string name, Input<string> id, SshKeyState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Created string
The date this key was added.
Label string
A label for the SSH Key.
SshKeyName string
The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.
Created string
The date this key was added.
Label string
A label for the SSH Key.
SshKey string
The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.
created string
The date this key was added.
label string
A label for the SSH Key.
sshKey string
The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.
created str
The date this key was added.
label str
A label for the SSH Key.
ssh_key str
The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.

Import

Linodes SSH Keys can be imported using the Linode SSH Key id, e.g.

 $ pulumi import linode:index/sshKey:SshKey mysshkey 1234567

Package Details

Repository
https://github.com/pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.