SimpleNVA: add the option to create additional files
This commit is contained in:
parent
abf3911046
commit
0611d66be7
|
@ -21,7 +21,7 @@ locals {
|
|||
network_interfaces = local.network_interfaces
|
||||
}))
|
||||
|
||||
files = {
|
||||
files = merge({
|
||||
"/var/run/nva/ipprefix_by_netmask.sh" = {
|
||||
content = file("${path.module}/files/ipprefix_by_netmask.sh")
|
||||
owner = "root"
|
||||
|
@ -32,7 +32,13 @@ locals {
|
|||
owner = "root"
|
||||
permissions = "0744"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
for path, attrs in var.files : path => {
|
||||
content = attrs.content,
|
||||
owner = attrs.owner,
|
||||
permissions = attrs.permissions
|
||||
}
|
||||
})
|
||||
|
||||
network_interfaces = [
|
||||
for index, interface in var.network_interfaces : {
|
||||
|
|
|
@ -20,6 +20,16 @@ variable "cloud_config" {
|
|||
default = null
|
||||
}
|
||||
|
||||
variable "files" {
|
||||
description = "Map of extra files to create on the instance, path as key. Owner and permissions will use defaults if null."
|
||||
type = map(object({
|
||||
content = string
|
||||
owner = string
|
||||
permissions = string
|
||||
}))
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "enable_health_checks" {
|
||||
description = "Configures routing to enable responses to health check probes."
|
||||
type = bool
|
||||
|
|
Loading…
Reference in New Issue