diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-21 22:57:55 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-21 22:57:55 +0100 |
commit | aba93e2f5ccb730af47997b491cc2b39df010a17 (patch) | |
tree | c6eeda580f07a7702601834fbcf1edd3478d4aaa | |
parent | 07f3654f623e2786dd9b544c8f461b885119c1a1 (diff) | |
download | govuk-mini-environment-admin-aba93e2f5ccb730af47997b491cc2b39df010a17.tar govuk-mini-environment-admin-aba93e2f5ccb730af47997b491cc2b39df010a17.tar.gz |
Add an output to the libvirt mini_environment terraform
This can then be used to easily determine if Terraform thinks there is
a VM running.
-rw-r--r-- | terraform/libvirt/mini_environment/main.tf | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/terraform/libvirt/mini_environment/main.tf b/terraform/libvirt/mini_environment/main.tf index 00c3394..504574c 100644 --- a/terraform/libvirt/mini_environment/main.tf +++ b/terraform/libvirt/mini_environment/main.tf @@ -81,3 +81,9 @@ resource "libvirt_domain" "main" { target_port = "1" } } + +# Outputs + +output "mini_environment_up" { + value = "${length(libvirt_domain.main.id) != 0}" +} |