Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

vpsAdmin VPS configuration example

The example configuration creates one VPS with remote-exec provisioner and deploys a public key.

Obtaining API authentication token

The provider needs an authentication token to the vpsAdmin API. The token can be obtained using any of HaveAPI clients, but the provider also comes with a simple CLI utility get-token.

For this example, the token should be put in an arbitrary tfvars file, e.g. token.auto.tfvars:

vpsadmin_token = "your token"

Setup

Edit main.tf and set up your public key for deployment and private key for provisioner.

Run it

$ terraform init
$ terraform plan
$ terraform apply

In case you have more than one VPS, please apply with -parallelism=1:

$ terraform apply -parallelism=1