SimpleNVA: add the option to create additional files
This commit is contained in:
@@ -21,7 +21,7 @@ locals {
|
|||||||
network_interfaces = local.network_interfaces
|
network_interfaces = local.network_interfaces
|
||||||
}))
|
}))
|
||||||
|
|
||||||
files = {
|
files = merge({
|
||||||
"/var/run/nva/ipprefix_by_netmask.sh" = {
|
"/var/run/nva/ipprefix_by_netmask.sh" = {
|
||||||
content = file("${path.module}/files/ipprefix_by_netmask.sh")
|
content = file("${path.module}/files/ipprefix_by_netmask.sh")
|
||||||
owner = "root"
|
owner = "root"
|
||||||
@@ -32,7 +32,13 @@ locals {
|
|||||||
owner = "root"
|
owner = "root"
|
||||||
permissions = "0744"
|
permissions = "0744"
|
||||||
}
|
}
|
||||||
}
|
}, {
|
||||||
|
for path, attrs in var.files : path => {
|
||||||
|
content = attrs.content,
|
||||||
|
owner = attrs.owner,
|
||||||
|
permissions = attrs.permissions
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
network_interfaces = [
|
network_interfaces = [
|
||||||
for index, interface in var.network_interfaces : {
|
for index, interface in var.network_interfaces : {
|
||||||
|
|||||||
@@ -20,6 +20,16 @@ variable "cloud_config" {
|
|||||||
default = null
|
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" {
|
variable "enable_health_checks" {
|
||||||
description = "Configures routing to enable responses to health check probes."
|
description = "Configures routing to enable responses to health check probes."
|
||||||
type = bool
|
type = bool
|
||||||
|
|||||||
Reference in New Issue
Block a user