diff --git a/main.tf b/main.tf index 61de7bb..17a5368 100644 --- a/main.tf +++ b/main.tf @@ -24,5 +24,6 @@ module "password_policy" { } resource "aws_iam_account_alias" "alias" { + count = var.account_alias ? 1 : 0 account_alias = var.account_name } \ No newline at end of file diff --git a/variables.tf b/variables.tf index a13068d..e37caea 100644 --- a/variables.tf +++ b/variables.tf @@ -3,3 +3,8 @@ variable "account_name" { type = string } +variable "account_alias" { + description = "Creates a preferred alias using account_name" + default = true + type = bool +} \ No newline at end of file