feat: initial radarr terraform configuration
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
include "root" {
|
||||
path = find_in_parent_folders("root.hcl")
|
||||
expose = true
|
||||
}
|
||||
|
||||
include "config" {
|
||||
path = "${get_repo_root()}/config/config.hcl"
|
||||
expose = true
|
||||
}
|
||||
|
||||
locals {
|
||||
config = include.config.locals.config
|
||||
}
|
||||
|
||||
terraform {
|
||||
source = "../../modules/radarr"
|
||||
}
|
||||
|
||||
inputs = {
|
||||
custom_formats = local.config.custom_formats
|
||||
quality_profiles = local.config.quality_profiles
|
||||
download_clients = local.config.download_clients
|
||||
indexers = local.config.indexers
|
||||
notifications = local.config.notifications
|
||||
delay_profiles = local.config.delay_profiles
|
||||
root_folders = local.config.root_folders
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
generate "backend" {
|
||||
path = "backend.tf"
|
||||
if_exists = "overwrite"
|
||||
contents = <<EOF
|
||||
provider "radarr" {
|
||||
url = "https://${path_relative_to_include()}"
|
||||
api_key = var.radarr_api_key
|
||||
}
|
||||
|
||||
variable "radarr_api_key" {
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
terraform {
|
||||
backend "consul" {
|
||||
address = "https://consul.service.consul"
|
||||
path = "infra/terraform/radarr/${path_relative_to_include()}/state"
|
||||
scheme = "https"
|
||||
lock = true
|
||||
ca_file = "/etc/pki/tls/certs/ca-bundle.crt"
|
||||
}
|
||||
required_version = ">= 1.10"
|
||||
required_providers {
|
||||
radarr = {
|
||||
source = "devopsarr/radarr"
|
||||
version = "2.3.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
}
|
||||
Reference in New Issue
Block a user