github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/website/source/docs/providers/cloudstack/r/ssh_keypair.html.markdown (about) 1 --- 2 layout: "cloudstack" 3 page_title: "CloudStack: cloudstack_ssh_keypair" 4 sidebar_current: "docs-cloudstack-resource-ssh-keypair" 5 description: |- 6 Creates or registers an SSH key pair. 7 --- 8 9 # cloudstack\_ssh\_keypair 10 11 Creates or registers an SSH key pair. 12 13 ## Example Usage 14 15 ``` 16 resource "cloudstack_ssh_keypair" "default" { 17 name = "myKey" 18 public_key = "${file("~/.ssh/id_rsa.pub")}" 19 project = "myProject" 20 } 21 ``` 22 23 ## Argument Reference 24 25 The following arguments are supported: 26 27 * `name` - (Required) The name of the SSH key pair. This is a unique value 28 within a CloudStack account. Changing this forces a new resource to be 29 created. 30 31 * `public_key` - (Optional) The public key to register with CloudStack. If 32 this is omitted, CloudStack will generate a new key pair. The key can 33 be loaded from a file on disk using the [`file()` interpolation 34 function](/docs/configuration/interpolation.html#file_path_). Changing 35 this forces a new resource to be created. 36 37 * `project` - (Optional) The name or ID of the project to register this 38 key to. Changing this forces a new resource to be created. 39 40 ## Attributes Reference 41 42 The following attributes are exported: 43 44 * `id` - The key pair ID. 45 * `fingerprint` - The fingerprint of the public key specified or created. 46 * `private_key` - The private key generated by CloudStack. Only available 47 if CloudStack generated the key pair.