AnhtuanUit / terraform-cloud-swarm

0 stars 0 forks source link

Quick Start

Install Terraform

sudo apt-get update && sudo apt-get install -y gnupg software-properties-common wget -O- https://apt.releases.hashicorp.com/gpg |
gpg --dearmor |
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg gpg --no-default-keyring
--keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg
--fingerprint echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg]
https://apt.releases.hashicorp.com $(lsb_release -cs) main" |
sudo tee /etc/apt/sources.list.d/hashicorp.list sudo apt update sudo apt-get install terraform

Clone Source Code

git clone https://github.com/AnhtuanUit/terraform-cloud-swarm.git

Navigate to Source Code Folder

cd terraform-cloud-swarm

Install Dependencies

terraform init

Initialize SSH Key

mkdir -p local-data
chmod +x scripts/init-ssh-key.sh
./scripts/init-ssh-key.sh

Deploy using Terraform

terraform apply