export OUTSCALE_ACCESSKEYID="<Outscale_AK>"
export OUTSCALE_SECRETKEYID="<Outscale_SK>"
export OUTSCALE_REGION="eu-west-2"
Create a terraform.tfvars
file with the filename of the SSH public key to use:
cat <<EOF > terraform.tfvars
public_key_file = "~/.ssh/id_ed25519.pub"
EOF
Initialize Terraform:
terraform init
Review and apply the Terraform plan:
terraform apply
This will create a VPC with a public subnet (including an Internet Gateway with a default route pointing to it) and a VM with a public IP.
When everything is created, refresh the output values (to get the public IP):
terraform refresh
And connect to the VM via SSH:
ssh outscale@$(terraform output -raw vm_public_ip)
Add the SSH key to your SSH agent before connecting