1. Packages
  2. Packet
  3. API Docs
  4. ProjectSshKey
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

packet.ProjectSshKey

Explore with Pulumi AI

packet logo
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

    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,
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-packet/sdk/v3/go/packet"
    	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		projectId := "<UUID_of_your_project>"
    		testProjectSshKey, err := packet.NewProjectSshKey(ctx, "testProjectSshKey", &packet.ProjectSshKeyArgs{
    			Name:      pulumi.String("test"),
    			PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2"),
    			ProjectId: pulumi.String(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = packet.NewDevice(ctx, "testDevice", &packet.DeviceArgs{
    			Hostname: pulumi.String("test"),
    			Plan:     pulumi.String("baremetal_0"),
    			Facilities: pulumi.StringArray{
    				pulumi.String("ewr1"),
    			},
    			OperatingSystem: pulumi.String("ubuntu_16_04"),
    			BillingCycle:    pulumi.String("hourly"),
    			ProjectSshKeyIds: pulumi.StringArray{
    				testProjectSshKey.ID(),
    			},
    			ProjectId: pulumi.String(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_packet as packet
    
    project_id = "<UUID_of_your_project>"
    test_project_ssh_key = packet.ProjectSshKey("testProjectSshKey",
        name="test",
        public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2",
        project_id=project_id)
    test_device = packet.Device("testDevice",
        hostname="test",
        plan="baremetal_0",
        facilities=["ewr1"],
        operating_system="ubuntu_16_04",
        billing_cycle="hourly",
        project_ssh_key_ids=[test_project_ssh_key.id],
        project_id=project_id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as packet from "@pulumi/packet";
    
    const projectId = "<UUID_of_your_project>";
    const testProjectSshKey = new packet.ProjectSshKey("testProjectSshKey", {
        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,
    });
    const testDevice = new packet.Device("testDevice", {
        hostname: "test",
        plan: "baremetal_0",
        facilities: ["ewr1"],
        operatingSystem: "ubuntu_16_04",
        billingCycle: "hourly",
        projectSshKeyIds: [testProjectSshKey.id],
        projectId: projectId,
    });
    

    Coming soon!

    Create ProjectSshKey Resource

    new ProjectSshKey(name: string, args: ProjectSshKeyArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectSshKey(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      name: Optional[str] = None,
                      project_id: Optional[str] = None,
                      public_key: Optional[str] = None)
    @overload
    def ProjectSshKey(resource_name: str,
                      args: ProjectSshKeyArgs,
                      opts: Optional[ResourceOptions] = None)
    func NewProjectSshKey(ctx *Context, name string, args ProjectSshKeyArgs, opts ...ResourceOption) (*ProjectSshKey, error)
    public ProjectSshKey(string name, ProjectSshKeyArgs args, CustomResourceOptions? opts = null)
    public ProjectSshKey(String name, ProjectSshKeyArgs args)
    public ProjectSshKey(String name, ProjectSshKeyArgs args, CustomResourceOptions options)
    
    type: packet:ProjectSshKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ProjectSshKeyArgs
    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 ProjectSshKeyArgs
    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 ProjectSshKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectSshKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectSshKeyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Name string

    The name of the SSH key for identification

    ProjectId string

    The ID of parent project

    PublicKey string

    The public key. If this is a file, it can be read using the file interpolation function

    Name string

    The name of the SSH key for identification

    ProjectId string

    The ID of parent project

    PublicKey string

    The public key. If this is a file, it can be read using the file interpolation function

    name String

    The name of the SSH key for identification

    projectId String

    The ID of parent project

    publicKey String

    The public key. If this is a file, it can be read using the file interpolation function

    name string

    The name of the SSH key for identification

    projectId string

    The ID of parent project

    publicKey string

    The public key. If this is a file, it can be read using the file interpolation function

    name str

    The name of the SSH key for identification

    project_id str

    The ID of parent project

    public_key str

    The public key. If this is a file, it can be read using the file interpolation function

    name String

    The name of the SSH key for identification

    projectId String

    The ID of parent project

    publicKey String

    The public key. If this is a file, it can be read using the file interpolation function

    Outputs

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

    Created string

    The timestamp for when the SSH key was created

    Fingerprint string

    The fingerprint of the SSH key

    Id string

    The provider-assigned unique ID for this managed resource.

    OwnerId string

    The ID of parent project (same as project_id)

    Updated string

    The timestamp for the last time the SSH key was updated

    Created string

    The timestamp for when the SSH key was created

    Fingerprint string

    The fingerprint of the SSH key

    Id string

    The provider-assigned unique ID for this managed resource.

    OwnerId string

    The ID of parent project (same as project_id)

    Updated string

    The timestamp for the last time the SSH key was updated

    created String

    The timestamp for when the SSH key was created

    fingerprint String

    The fingerprint of the SSH key

    id String

    The provider-assigned unique ID for this managed resource.

    ownerId String

    The ID of parent project (same as project_id)

    updated String

    The timestamp for the last time the SSH key was updated

    created string

    The timestamp for when the SSH key was created

    fingerprint string

    The fingerprint of the SSH key

    id string

    The provider-assigned unique ID for this managed resource.

    ownerId string

    The ID of parent project (same as project_id)

    updated string

    The timestamp for the last time the SSH key was updated

    created str

    The timestamp for when the SSH key was created

    fingerprint str

    The fingerprint of the SSH key

    id str

    The provider-assigned unique ID for this managed resource.

    owner_id str

    The ID of parent project (same as project_id)

    updated str

    The timestamp for the last time the SSH key was updated

    created String

    The timestamp for when the SSH key was created

    fingerprint String

    The fingerprint of the SSH key

    id String

    The provider-assigned unique ID for this managed resource.

    ownerId String

    The ID of parent project (same as project_id)

    updated String

    The timestamp for the last time the SSH key was updated

    Look up Existing ProjectSshKey Resource

    Get an existing ProjectSshKey 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?: ProjectSshKeyState, opts?: CustomResourceOptions): ProjectSshKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created: Optional[str] = None,
            fingerprint: Optional[str] = None,
            name: Optional[str] = None,
            owner_id: Optional[str] = None,
            project_id: Optional[str] = None,
            public_key: Optional[str] = None,
            updated: Optional[str] = None) -> ProjectSshKey
    func GetProjectSshKey(ctx *Context, name string, id IDInput, state *ProjectSshKeyState, opts ...ResourceOption) (*ProjectSshKey, error)
    public static ProjectSshKey Get(string name, Input<string> id, ProjectSshKeyState? state, CustomResourceOptions? opts = null)
    public static ProjectSshKey get(String name, Output<String> id, ProjectSshKeyState 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:
    Created string

    The timestamp for when the SSH key was created

    Fingerprint string

    The fingerprint of the SSH key

    Name string

    The name of the SSH key for identification

    OwnerId string

    The ID of parent project (same as project_id)

    ProjectId string

    The ID of parent project

    PublicKey string

    The public key. If this is a file, it can be read using the file interpolation function

    Updated string

    The timestamp for the last time the SSH key was updated

    Created string

    The timestamp for when the SSH key was created

    Fingerprint string

    The fingerprint of the SSH key

    Name string

    The name of the SSH key for identification

    OwnerId string

    The ID of parent project (same as project_id)

    ProjectId string

    The ID of parent project

    PublicKey string

    The public key. If this is a file, it can be read using the file interpolation function

    Updated string

    The timestamp for the last time the SSH key was updated

    created String

    The timestamp for when the SSH key was created

    fingerprint String

    The fingerprint of the SSH key

    name String

    The name of the SSH key for identification

    ownerId String

    The ID of parent project (same as project_id)

    projectId String

    The ID of parent project

    publicKey String

    The public key. If this is a file, it can be read using the file interpolation function

    updated String

    The timestamp for the last time the SSH key was updated

    created string

    The timestamp for when the SSH key was created

    fingerprint string

    The fingerprint of the SSH key

    name string

    The name of the SSH key for identification

    ownerId string

    The ID of parent project (same as project_id)

    projectId string

    The ID of parent project

    publicKey string

    The public key. If this is a file, it can be read using the file interpolation function

    updated string

    The timestamp for the last time the SSH key was updated

    created str

    The timestamp for when the SSH key was created

    fingerprint str

    The fingerprint of the SSH key

    name str

    The name of the SSH key for identification

    owner_id str

    The ID of parent project (same as project_id)

    project_id str

    The ID of parent project

    public_key str

    The public key. If this is a file, it can be read using the file interpolation function

    updated str

    The timestamp for the last time the SSH key was updated

    created String

    The timestamp for when the SSH key was created

    fingerprint String

    The fingerprint of the SSH key

    name String

    The name of the SSH key for identification

    ownerId String

    The ID of parent project (same as project_id)

    projectId String

    The ID of parent project

    publicKey String

    The public key. If this is a file, it can be read using the file interpolation function

    updated String

    The timestamp for the last time the SSH key was updated

    Package Details

    Repository
    Packet pulumi/pulumi-packet
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the packet Terraform Provider.

    packet logo
    Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi