1
0
IaC/terraform/vultr/main.tf

32 lines
621 B
Terraform
Raw Normal View History

2024-04-17 21:28:39 -04:00
terraform {
required_version = ">= 1.8.0"
required_providers {
vault = {
source = "hashicorp/vault"
version = ">= 4.2.0"
}
vultr = {
source = "vultr/vultr"
version = ">= 2.19.0"
}
}
backend "local" {
path = "/home/michael/Nextcloud/Backups/tfstate/vultr.tfstate"
}
}
provider "vault" {
# Export the vault token to the environment variable VAULT_TOKEN
address = "https://vault.balsillie.house"
}
data "vault_kv_secret" "vultr" {
path = "kv/vultr"
}
provider "vultr" {
api_key = data.vault_kv_secret.vultr.data.api_key
rate_limit = 100
retry_limit = 3
}