The below Terraform files will create a new IONOS VDC and server instance, it will also copy a locally specified SSH key for the root key and finally copy a hello.txt file to /tmp/hello.txt. Once deployed you will be able to login to the instance with your SSH key.
Prerequisites:
- You will need terraform installed Hashicorp how to install Terraform
- You will need to set your IONOS username and password locally as environment variables (see export in deploy to the right)
- You will need to create a directory and have an SSH key that you would like to use
- You will need to create 3 files locally
- terraform-simple-server.tf will contain the main script (below)
- variables.tf will contain the username and password settings to use in this deployment (below)
- hello.txt to copy up to the provisioned instance