Terraform module to generate and upload sshkey.
Included resource
- nifcloud_key_pair
There are examples included in the examples folder but simple usage is as follows:
provider "nifcloud" {
region = "jp-west-1"
}
# Module
module "sshkey_uploader" {
source = "../../"
key_name = "deployerkey"
}
Then perform the following commands on the root folder:
terraform init
to get the pluginsterraform plan
to see the infrastructure planterraform apply
to apply the infrastructure buildterraform destroy
to destroy the built infrastructure
Name | Description | Type | Default |
---|---|---|---|
key_name | The key name of the Key Pair to use for the instance | string |
Name | Description |
---|---|
public_key | The generated public key |
private_key | The generated private key |
Before this module can be used on a project, you must ensure that the following pre-requisites are fulfilled:
- Terraform are installed on the machine where Terraform is executed.
- The Nifcloud Account you execute the module with has the right permissions.
- You can set environment variable
NIFCLOUD_ACCESS_KEY_ID
andNIFCLOUD_SECRET_ACCESS_KEY
- You can set environment variable
- Terraform 1.3.7
- Terraform Provider for Nifcloud 1.7.0
- Yoshitaka Fujii (@ystkfujii)