Skip to content

Commit

Permalink
Merge pull request #12 from QuiNovas/develop
Browse files Browse the repository at this point in the history
conditional iam alias for account
  • Loading branch information
vchinnakotla authored Jun 14, 2021
2 parents c9de840 + 09a8d37 commit 0d33846
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ module "password_policy" {
}

resource "aws_iam_account_alias" "alias" {
count = var.account_alias ? 1 : 0
account_alias = var.account_name
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ variable "account_name" {
type = string
}

variable "account_alias" {
description = "Creates a preferred alias using account_name"
default = true
type = bool
}

0 comments on commit 0d33846

Please sign in to comment.