genesiscloud.SSHKey
Explore with Pulumi AI
SSH key resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as genesiscloud from "@genesiscloud/pulumi-genesiscloud";
const example = new genesiscloud.SSHKey("example", {publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com"});
import pulumi
import pulumi_genesiscloud as genesiscloud
example = genesiscloud.SSHKey("example", public_key="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com")
package main
import (
"github.com/genesiscloud/pulumi-genesiscloud/sdk/go/genesiscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := genesiscloud.NewSSHKey(ctx, "example", &genesiscloud.SSHKeyArgs{
PublicKey: pulumi.String("ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Genesiscloud = GenesisCloud.PulumiPackage.Genesiscloud;
return await Deployment.RunAsync(() =>
{
var example = new Genesiscloud.SSHKey("example", new()
{
PublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.genesiscloud.SSHKey;
import com.pulumi.genesiscloud.SSHKeyArgs;
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 example = new SSHKey("example", SSHKeyArgs.builder()
.publicKey("ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com")
.build());
}
}
resources:
example:
type: genesiscloud:SSHKey
properties:
publicKey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com
Create SSHKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SSHKey(name: string, args: SSHKeyArgs, opts?: CustomResourceOptions);
@overload
def SSHKey(resource_name: str,
args: SSHKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SSHKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
public_key: Optional[str] = None,
name: Optional[str] = None,
timeouts: Optional[SSHKeyTimeoutsArgs] = None)
func NewSSHKey(ctx *Context, name string, args SSHKeyArgs, opts ...ResourceOption) (*SSHKey, error)
public SSHKey(string name, SSHKeyArgs args, CustomResourceOptions? opts = null)
public SSHKey(String name, SSHKeyArgs args)
public SSHKey(String name, SSHKeyArgs args, CustomResourceOptions options)
type: genesiscloud:SSHKey
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 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.
- name String
- The unique name of the resource.
- args SSHKeyArgs
- 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 sshkeyResource = new Genesiscloud.SSHKey("sshkeyResource", new()
{
PublicKey = "string",
Name = "string",
Timeouts = new Genesiscloud.Inputs.SSHKeyTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
Update = "string",
},
});
example, err := genesiscloud.NewSSHKey(ctx, "sshkeyResource", &genesiscloud.SSHKeyArgs{
PublicKey: pulumi.String("string"),
Name: pulumi.String("string"),
Timeouts: &genesiscloud.SSHKeyTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var sshkeyResource = new SSHKey("sshkeyResource", SSHKeyArgs.builder()
.publicKey("string")
.name("string")
.timeouts(SSHKeyTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.update("string")
.build())
.build());
sshkey_resource = genesiscloud.SSHKey("sshkeyResource",
public_key="string",
name="string",
timeouts={
"create": "string",
"delete": "string",
"read": "string",
"update": "string",
})
const sshkeyResource = new genesiscloud.SSHKey("sshkeyResource", {
publicKey: "string",
name: "string",
timeouts: {
create: "string",
"delete": "string",
read: "string",
update: "string",
},
});
type: genesiscloud:SSHKey
properties:
name: string
publicKey: string
timeouts:
create: string
delete: string
read: string
update: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SSHKey resource accepts the following input properties:
- Public
Key string - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- Name string
- The human-readable name for the SSH key.
- Timeouts
Genesis
Cloud. Pulumi Package. Genesiscloud. Inputs. SSHKey Timeouts
- Public
Key string - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- Name string
- The human-readable name for the SSH key.
- Timeouts
SSHKey
Timeouts Args
- public
Key String - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- name String
- The human-readable name for the SSH key.
- timeouts
SSHKey
Timeouts
- public
Key string - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- name string
- The human-readable name for the SSH key.
- timeouts
SSHKey
Timeouts
- public_
key str - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- name str
- The human-readable name for the SSH key.
- timeouts
SSHKey
Timeouts Args
- public
Key String - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- name String
- The human-readable name for the SSH key.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the SSHKey resource produces the following output properties:
- Created
At string - The timestamp when this SSH key was created in RFC 3339.
- Fingerprint string
- The fingerprint of the SSH key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Created
At string - The timestamp when this SSH key was created in RFC 3339.
- Fingerprint string
- The fingerprint of the SSH key.
- Id string
- The provider-assigned unique ID for this managed resource.
- created
At String - The timestamp when this SSH key was created in RFC 3339.
- fingerprint String
- The fingerprint of the SSH key.
- id String
- The provider-assigned unique ID for this managed resource.
- created
At string - The timestamp when this SSH key was created in RFC 3339.
- fingerprint string
- The fingerprint of the SSH key.
- id string
- The provider-assigned unique ID for this managed resource.
- created_
at str - The timestamp when this SSH key was created in RFC 3339.
- fingerprint str
- The fingerprint of the SSH key.
- id str
- The provider-assigned unique ID for this managed resource.
- created
At String - The timestamp when this SSH key was created in RFC 3339.
- fingerprint String
- The fingerprint of the SSH key.
- id String
- The provider-assigned unique ID for this managed resource.
Look up 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_at: Optional[str] = None,
fingerprint: Optional[str] = None,
name: Optional[str] = None,
public_key: Optional[str] = None,
timeouts: Optional[SSHKeyTimeoutsArgs] = 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)
public static SSHKey get(String name, Output<String> id, SSHKeyState 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.
- Created
At string - The timestamp when this SSH key was created in RFC 3339.
- Fingerprint string
- The fingerprint of the SSH key.
- Name string
- The human-readable name for the SSH key.
- Public
Key string - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- Timeouts
Genesis
Cloud. Pulumi Package. Genesiscloud. Inputs. SSHKey Timeouts
- Created
At string - The timestamp when this SSH key was created in RFC 3339.
- Fingerprint string
- The fingerprint of the SSH key.
- Name string
- The human-readable name for the SSH key.
- Public
Key string - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- Timeouts
SSHKey
Timeouts Args
- created
At String - The timestamp when this SSH key was created in RFC 3339.
- fingerprint String
- The fingerprint of the SSH key.
- name String
- The human-readable name for the SSH key.
- public
Key String - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- timeouts
SSHKey
Timeouts
- created
At string - The timestamp when this SSH key was created in RFC 3339.
- fingerprint string
- The fingerprint of the SSH key.
- name string
- The human-readable name for the SSH key.
- public
Key string - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- timeouts
SSHKey
Timeouts
- created_
at str - The timestamp when this SSH key was created in RFC 3339.
- fingerprint str
- The fingerprint of the SSH key.
- name str
- The human-readable name for the SSH key.
- public_
key str - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- timeouts
SSHKey
Timeouts Args
- created
At String - The timestamp when this SSH key was created in RFC 3339.
- fingerprint String
- The fingerprint of the SSH key.
- name String
- The human-readable name for the SSH key.
- public
Key String - SSH public key. - If the value of this attribute changes, the resource will be replaced.
- timeouts Property Map
Supporting Types
SSHKeyTimeouts, SSHKeyTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
$ pulumi import genesiscloud:index/sSHKey:SSHKey example 18efeec8-94f0-4776-8ff2-5e9b49c74608
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- genesiscloud genesiscloud/pulumi-genesiscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
genesiscloud
Terraform Provider.