nixos-config/terranix/terranix.org/targets/namecheap/terragrunt.hcl

31 lines
690 B
HCL
Raw Normal View History

inputs = {
namecheap_user = run_cmd("--terragrunt-quiet", "pass", "show", "development/namecheap.com/username")
namecheap_api_key = run_cmd("--terragrunt-quiet", "pass", "show", "development/namecheap.com/api-key")
}
generate "provider" {
path = "__provider.tf"
if_exists = "overwrite_terragrunt"
contents = <<EOF
terraform {
required_providers {
namecheap = {
source = "namecheap/namecheap"
version = ">= 2.0.0"
}
}
}
# Namecheap API credentials
provider "namecheap" {
user_name = var.namecheap_user
api_user = var.namecheap_user
api_key = var.namecheap_api_key
}
variable "namecheap_user" { }
variable "namecheap_api_key" { }
EOF
}