2024-01-03 14:32:22 +01:00
|
|
|
|
2024-01-07 00:27:29 +01:00
|
|
|
include {
|
|
|
|
path = find_in_parent_folders()
|
|
|
|
}
|
|
|
|
|
2024-01-03 14:32:22 +01:00
|
|
|
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 = {
|
2024-01-07 00:27:29 +01:00
|
|
|
source = "namecheap/namecheap"
|
2024-01-03 14:32:22 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2024-01-07 00:27:29 +01:00
|
|
|
variable "namecheap_user" {}
|
|
|
|
variable "namecheap_api_key" {}
|
2024-01-03 14:32:22 +01:00
|
|
|
EOF
|
|
|
|
}
|