Skip to content

Latest commit

 

History

History

infrastructure_user

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Infrastructure User

Creates an AWS user (and a group) for running the infrastructure Terraform code, which creates an EC2 instance for hosting the VPN server.

WARNING: not suitable for use in an automated pipeline.

Instructions

Install Terraform

Terraform is required to run the following instructions. It can be installed, or used from Docker.

Define the necessary AWS keys as environment variables

# Always required:
export AWS_ACCESS_KEY_ID="AFG..."
export AWS_SECRET_ACCESS_KEY="ASR..."

# May be necessary:
export AWS_SESSION_TOKEN="WIo..."

Initialize terraform locally if it isn't initialized yet

terraform init

Create the user and its policies

terraform apply

Get the user access keys

After running "terraform apply", the access keys (access key id and secret acess key) will be printed to the screen in clear text. The keys will also be stored in the local Terraform state files (it's recommended to delete these files to avoid unintended access). Use them to follow the README in the infrastructure folder, not the one in the terraform_backend folder.

Destroy the backend resources (optional)

terraform destroy