nixos-config/terraform/hetzner/terragrunt.hcl

28 lines
492 B
HCL
Raw Permalink Normal View History

2024-06-21 22:33:32 +02:00
generate "provider" {
path = "_generated_provider.tf"
if_exists = "overwrite_terragrunt"
contents = <<EOF
terraform {
required_providers {
hcloud = {
source = "hetznercloud/hcloud"
version = "1.44.1"
}
}
}
variable "hcloud_token" {
sensitive = true
}
# Configure the Hetzner Cloud Provider
provider "hcloud" {
token = var.hcloud_token
}
EOF
}
inputs = {
hcloud_token = run_cmd("--terragrunt-quiet", "pass", "development/hetzner.com/api-token")
}