-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
main.tf
25 lines (20 loc) · 994 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
data "aws_caller_identity" "default" {}
resource "aws_iam_account_alias" "default" {
count = module.this.enabled == true ? 1 : 0
account_alias = module.this.id
}
resource "aws_iam_account_password_policy" "default" {
count = var.password_policy_enabled == true ? 1 : 0
allow_users_to_change_password = var.allow_users_to_change_password
hard_expiry = var.hard_expiry
max_password_age = var.max_password_age
minimum_password_length = var.minimum_password_length
password_reuse_prevention = var.password_reuse_prevention
require_lowercase_characters = var.require_lowercase_characters
require_uppercase_characters = var.require_uppercase_characters
require_numbers = var.require_numbers
require_symbols = var.require_symbols
}
locals {
account_alias = module.this.enabled == true ? join("", aws_iam_account_alias.default.*.account_alias) : data.aws_caller_identity.default.account_id
}