---
# System prepended metadata

title: terraform setup
tags: [terraform]

---

---
title: terraform setup
tags: terraform
description: View the slide with "Slide Mode".
slideOptions:
  spotlight:
    enabled: true
---
# terraform setup
- instal·lar terraform
- instal·lar autocompletat
- **!!! configurar la caché de mòduls** (once is enough: avoid wasting hd space!)
- https://learn.hashicorp.com/tutorials/terraform/install-cli?in=terraform/aws-get-started

```
# 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

# install autocomplete
terraform -install-autocomplete

# install terraform caché
cat << _EOF_ > ~/.terraformrc 
plugin_cache_dir   = "$HOME/.terraform.d/plugin-cache"
disable_checkpoint = true
_EOF_
