From e2d96d4ebf5da4a745cb123717536acac64cbda8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Sodr=C3=A9?= Date: Tue, 26 Jan 2021 17:02:46 -0500 Subject: [PATCH] Use module.this.enabled instead of var.enabled for count (#9) When using the context.tf, one should use module.this.enabled instead of accessing var.enabled directly. --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index c1b7f2c..fa75bfc 100644 --- a/main.tf +++ b/main.tf @@ -1,7 +1,7 @@ data "aws_caller_identity" "default" {} resource "aws_iam_account_alias" "default" { - count = var.enabled == true ? 1 : 0 + count = module.this.enabled == true ? 1 : 0 account_alias = module.this.id }