forked from pierront/but3-iac
5527d753c0df415c6c1491edc7a21e2dfc80455f
IaC_BUT3
Activer les API suivantes
activer api : Identity and Access Management (IAM) API activer api : Cloud Resource Manager API
Créer la VM
Créer une VM small comme les tp précédents
Installation sur la VM
sudo apt install git
git clone https://grond.iut-fbleau.fr/FORKED_USER/but3-iac.git
Génération de la clé privée
ssh-keygen -t rsa -f ~/.ssh/id_ed25519 -C <john_doe_gmail_com>
replace "." & "@" with "_"
eval `ssh-agent`
ssh-add ~/.ssh/id_ed25519
Installation terraform
Source : https://www.hashicorp.com/official-packaging-guide?product_intent=terraform
Ajouter terraform dans votre list de package disponible
sudo apt update && sudo apt install gpg
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint
echo "deb [arch=$(dpkg --print-architecture) 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
Installer terraform et ansible
sudo apt update
sudo apt install terraform`
sudo apt install ansible
ansible-galaxy collection install community.mysql
sudo apt install -y python3-google-auth python3-requests python3-google-auth-httplib2 python3-googleapi
Connection avec google
Faire les étapes suivantes pour la connexion à Google sur votre VM
Description
Languages
HCL
97.7%
Smarty
2.3%



