Formation DevOps | Formation Terraform : 1- Premier pas avec Terraform: Stockage des variables
This website is powered by ItGalaxy.io
Terraform : Stockage variables
Type de variables :
String
Number
Bool (boolean)
Liste
Map
Test intéractif avec une variable string en outupt:
variable “str” {}
output “variable” {value = var.str}
On peut aussi declarer output “mavariable” { value = “${var.str}” }
Les différents niveaux des variables :
Ordre des variables :
**1. Variable d’environnement
- Fichier terraform.tfvars
- Fichier terraform.tfvars.json
- Fichier *.auto.tfvars , *.auto.tfvars.json
- CLI : -var ou –var-file**
/!\De moins vers le plus prioritaire.
- Tester les différents niveau de variables:
- Niveau variable d’environnement
export TF_VAR_str=“env”
variable “str” {}
output “variable” {value = var.str}
- Fichier terraform.tfvars
echo ‘str=“fichier terraform.tfvars”’ > terraform.tfvars
terraform apply
- Fichier *.auto.tfvars
echo ‘str=“fichier production.auto.tfvars”’ > production.auto.tfvars
terraform apply
- Paramètre -var
terraform apply -var str=’“var”’
terraform apply
- Paramètre –var-file
echo ‘str=“fichier varfile.tfvars”’ > varfile.tfvars
terraform apply -var-file varfile.tfvars
terraform apply
1. Nous contactez
- Description: Besoin de Formation et des Solutions cloud complètes pour vos applications
- Links:
2. Infra as a Service
- Description: Infrastructure cloud évolutive et sécurisée
- Links:
3. Projets Développeurs
- Description: Découvrez des opportunités passionnantes pour les développeurs
- Links:
4. Développeurs
- Description: Rejoignez notre communauté de développeurs
- Links:
5. Formations Complètes
- Description: Accédez à des formations professionnelles de haute qualité
- Links:
6. Marketplace
- Description: Découvrez notre place de marché de services
- Links:
7. Blogs
- Description: Découvrez nos blogs
- Links:
- comment creer une application mobile ?
- Comment monitorer un site web ?
- Command Checkout in git ?
- Comment git checkout to commit ?
- supprimer une branche git
- dockercoin
- kubernetes c est quoi
- architecture kubernetes
- Installer Gitlab Runner ?
- .gitlab-ci.yml exemples
- CI/CD
- svelte 5 vs solid
- svelte vs lit
- solidjs vs qwik
- alpine vs vue
- Plateform Freelance 2025
- Creation d’un site Web gratuitement
This website is powered by ItGalaxy.io