git clone https://github.com/tty8747/terraform-education
cd task1
# or cd task2
aws --version
aws-cli/2.4.10 Python/3.8.8 Linux/5.4.0-88-generic exe/x86_64.ubuntu.20 prompt/off
aws configure --profile tty8747
AWS Access Key ID [None]: ****************SVBL
AWS Secret Access Key [None]: ****************t3DD
Default region name [None]: eu-central-1
Default output format [None]:
aws configure list --profile tty8747
Name Value Type Location
---- ----- ---- --------
profile tty8747 manual --profile
access_key ****************SVBL shared-credentials-file
secret_key ****************t3DD shared-credentials-file
region eu-central-1 config-file ~/.aws/config
Install Terraform
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install terraform
terraform --version
Terraform v1.1.6
terraform init
ssh-keygen -t rsa -b 2048 # if you haven't got it
terraform plan
terraform apply --auto-approve