Browse Source
Merge pull request #2025 from kubernetes-incubator/terraform-aws-inventory
contrib/terraform/aws: Make path to generated inventory configurable
pull/1976/merge
Antoine Legrand
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
7 additions and
1 deletions
-
contrib/terraform/aws/create-infrastructure.tf
-
contrib/terraform/aws/terraform.tfvars
-
contrib/terraform/aws/variables.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 { |
|
|
|
|
|
@ -31,3 +31,5 @@ default_tags = { |
|
|
|
# Env = "devtest" |
|
|
|
# Product = "kubernetes" |
|
|
|
} |
|
|
|
|
|
|
|
inventory_file = "../../../inventory/hosts" |
|
|
@ -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" |
|
|
|
} |