generated from batinicaz/template-terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inputs.tf
93 lines (79 loc) · 2.6 KB
/
inputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
variable "availability_domain" {
type = string
description = "Availability domain where instance will be launched."
}
variable "domain_name" {
description = "The CloudFlare managed domain name to work under"
type = string
}
variable "instance_shape" {
type = string
default = "VM.Standard.A1.Flex"
description = "Instance type to use, default is the always free domain ARM option."
}
variable "instance_ocpus" {
type = number
description = "The number of Oracle CPU's to allocate to the instance"
default = 1
}
variable "instance_ram" {
type = number
description = "The total amount of RAM (in gigabytes) to allocate to the instance"
default = 6
}
variable "lb_bandwidth" {
description = "Bandwidth in Mbps. Default is the always free option."
type = number
default = 10
}
variable "services" {
description = "The configuration of the different services running on the freshrss instance"
type = map(object({
port = number // The port the service is running on
subdomain = string // The subdomain to expose the service on
update_nginx_config = optional(bool, false) // If true will replace the servername in the nginx config directory
waf_block = optional(bool, false) // If true will prevent access from anything other than trusted IP's
}))
}
variable "trusted_ips_dns" {
description = "A domain with A records for IP's that should be permitted to access WAF protected services over the internet"
type = string
sensitive = true
}
variable "tf_cloud_organisation" {
description = "The name of the TF cloud organisation"
type = string
}
variable "oci_fingerprint" {
description = "The fingerprint of the key used to authenticate with OCI"
type = string
}
variable "oci_private_key" {
description = "The private key to authenticate with OCI"
sensitive = true
type = string
}
variable "oci_region" {
description = "The region in which to create resources"
type = string
}
variable "oci_tenancy_id" {
description = "The tenancy id where to resources are to be created"
type = string
}
variable "oci_user_id" {
description = "The ID of user that terraform will use to create the resources"
type = string
}
locals {
default_tags = {
"terraform.managed" = "terraform"
"terraform.repo" = "https://github.com/batinicaz/freshrss"
}
services = {
for service, config in var.services :
service => merge(config, {
fqdn = "${config.subdomain}.${var.domain_name}"
})
}
}