Skip to content

Commit 117cc64

Browse files
committed
fix: output error fixed
1 parent 3aee498 commit 117cc64

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

outputs.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
output "prefix_list_id" {
2-
value = var.prefix_list_enabled && length(var.prefix_list_ids) < 1 ? aws_ec2_managed_prefix_list.prefix_list[0].id : null
2+
value = var.enable && var.prefix_list_enabled && length(var.prefix_list_ids) < 1 ? aws_ec2_managed_prefix_list.prefix_list[0].id : null
33
description = "The ID of the prefix list."
44
}
55

66
output "security_group_id" {
7-
value = var.new_sg ? aws_security_group.default[0].id : null
7+
value = var.new_sg && var.enable ? aws_security_group.default[0].id : null
88
description = "IDs on the AWS Security Groups associated with the instance."
99
}
1010

1111
output "security_group_arn" {
12-
value = var.new_sg ? aws_security_group.default[0].arn : null
12+
value = var.new_sg && var.enable ? aws_security_group.default[0].arn : null
1313
description = "IDs on the AWS Security Groups associated with the instance."
1414
}
1515

1616
output "security_group_tags" {
17-
value = var.new_sg ? aws_security_group.default[0].tags : null
17+
value = var.new_sg && var.enable ? aws_security_group.default[0].tags : null
1818
description = "A mapping of public tags to assign to the resource."
1919
}

0 commit comments

Comments
 (0)