We will create a cumpute instance that could be used as a remote working station.
Be on the right GCP account! DO NOT CREATE instances on a WRONG account!
- Create a project
- Enable billing on the project
- Enable Compute Engine API for more details see link
Execute the gcloud init
command
If you dont have gcloud
installed, use the official guide
To configure the provider execute the following command
gcloud auth application-default login
for more details see link
- Run
terraform plan
to check the previous configurations
This ssh key will be used to access the instance.
If you don't already have an ssh
key to use with this instance create a new one
- Create an SSH key pair
- We will set the path of the public key as
tfvar
mkdir ~/.ssh/<USER_NAME>
ssh-keygen -t rsa -f ~/.ssh/<USER_NAME>/<USER_NAME>_gci_access_key -C <USER_NAME> -b 2048
The instance will use this ssh key to access the github with it.
If you don't already have an ssh
key to use with this instance create a new one
- Connecting to GitHub with SSH
- Set the path of the public key as
tfvar
mkdir ~/.ssh/<USER_NAME>
ssh-keygen -t ed25519 -f ~/.ssh/<USER_NAME>/<USER_NAME>_gci_github_key -C "<USER_NAME>@example.com"
The available variables can be seen in the terraform/variable.tf
file. There are some with default values.
All the possible variables could be defined in the a terraform/terraform.tfvars
file.
Execute terraform plan
and or terraform apply
to check and deploy the terraform plan.
Usefull tutorials, docs