Class ProjectSshKey
Provides a Packet project SSH key resource to manage project-specific SSH keys. Project SSH keys will only be populated onto servers that belong to that project, in contrast to User SSH Keys.
Example Usage
using Pulumi;
using Packet = Pulumi.Packet;
class MyStack : Stack
{
public MyStack()
{
var projectId = "<UUID_of_your_project>";
var testProjectSshKey = new Packet.ProjectSshKey("testProjectSshKey", new Packet.ProjectSshKeyArgs
{
Name = "test",
PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2",
ProjectId = projectId,
});
var testDevice = new Packet.Device("testDevice", new Packet.DeviceArgs
{
Hostname = "test",
Plan = "baremetal_0",
Facilities =
{
"ewr1",
},
OperatingSystem = "ubuntu_16_04",
BillingCycle = "hourly",
ProjectSshKeyIds =
{
testProjectSshKey.Id,
},
ProjectId = projectId,
});
}
}
Inherited Members
Namespace: Pulumi.Packet
Assembly: Pulumi.Packet.dll
Syntax
public class ProjectSshKey : CustomResource
Constructors
View SourceProjectSshKey(String, ProjectSshKeyArgs, CustomResourceOptions)
Create a ProjectSshKey resource with the given unique name, arguments, and options.
Declaration
public ProjectSshKey(string name, ProjectSshKeyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ProjectSshKeyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCreated
The timestamp for when the SSH key was created
Declaration
public Output<string> Created { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Fingerprint
The fingerprint of the SSH key
Declaration
public Output<string> Fingerprint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the SSH key for identification
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
OwnerId
The ID of parent project (same as project_id)
Declaration
public Output<string> OwnerId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ProjectId
The ID of parent project
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PublicKey
The public key. If this is a file, it can be read using the file interpolation function
Declaration
public Output<string> PublicKey { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Updated
The timestamp for the last time the SSH key was updated
Declaration
public Output<string> Updated { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ProjectSshKeyState, CustomResourceOptions)
Get an existing ProjectSshKey resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ProjectSshKey Get(string name, Input<string> id, ProjectSshKeyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ProjectSshKeyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ProjectSshKey |