packet_ssh_key

    0

    0

    lucycodes42

    Terraform snippets

    The following code sets up a packet_ssh_key resource to store the public key for a given resource. The name of the resource is set to my-description-myResourceName and the description is set to my-description-myResourceName . The public_key attribute points to the path to the public key file, which is stored in the home directory of the terraform user.

    Shortcut: tf_packet_ssh_key

    resource "packet_ssh_key" "${myResourceName}" {
       name = "my-${myResourceName}"
       description = "my-description-${myResourceName}"
    
       public_key = "\${file("/home/terraform/.ssh/id_rsa.pub")}"
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.