Skip to content

Commit 6b3ab47

Browse files
authored
Merge pull request MitocGroup#164 from MitocGroup/fixed_depends_on
minor improvements
2 parents a282c9e + 0ced989 commit 6b3ab47

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

modules/landing_zone/data.tf

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
data "local_file" "landing_zone_output_file" {
2-
depends_on = [null_resource.landing_zone_apply]
2+
depends_on = [
3+
null_resource.terraform_output,
4+
null_resource.landing_zone_apply
5+
]
36
filename = pathexpand(var.terraform_output_path)
47
}

modules/landing_zone/main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ resource "null_resource" "terraform_output" {
66

77
resource "null_resource" "terraform_config" {
88
depends_on = [null_resource.terraform_output]
9+
count = length(var.landing_zone_components) == 0 ? 0 : 1
10+
911
triggers = {
1012
config = var.terraform_config
1113
sample = ".terrahub.yml.sample"

modules/landing_zone/output.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
output "landing_zone" {
22
depends_on = [data.local_file.landing_zone_output_file]
33
sensitive = true
4-
value = data.local_file.landing_zone_output_file.content == "" ? jsondecode("\"null\":{\"default\":[\"null\"]}") : jsondecode(data.local_file.landing_zone_output_file.content)
4+
value = data.local_file.landing_zone_output_file.content == "" ? jsondecode("{\"null\":{\"default\":[\"null\"]}}") : jsondecode(data.local_file.landing_zone_output_file.content)
55
description = "The map of all output variables from components."
66
}

0 commit comments

Comments
 (0)