Browse Source

Make path to generated inventory configurable

pull/2025/head
Jan Jungnickel 6 years ago
parent
commit
8766b36144
3 changed files with 7 additions and 1 deletions
  1. 2
      contrib/terraform/aws/create-infrastructure.tf
  2. 2
      contrib/terraform/aws/terraform.tfvars
  3. 4
      contrib/terraform/aws/variables.tf

2
contrib/terraform/aws/create-infrastructure.tf

@ -181,7 +181,7 @@ data "template_file" "inventory" {
resource "null_resource" "inventories" {
provisioner "local-exec" {
command = "echo '${data.template_file.inventory.rendered}' > ../../../inventory/hosts"
command = "echo '${data.template_file.inventory.rendered}' > ${var.inventory_file}"
}
triggers {

2
contrib/terraform/aws/terraform.tfvars

@ -31,3 +31,5 @@ default_tags = {
# Env = "devtest"
# Product = "kubernetes"
}
inventory_file = "../../../inventory/hosts"

4
contrib/terraform/aws/variables.tf

@ -103,3 +103,7 @@ variable "default_tags" {
description = "Default tags for all resources"
type = "map"
}
variable "inventory_file" {
description = "Where to store the generated inventory file"
}
Loading…
Cancel
Save