1
0
IaC/terraform/vultr/main.tf
2024-04-18 13:28:39 +12:00

32 lines
621 B
HCL

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
}