diff --git a/layers/security_identity_compliance/job-function-roles/main.tf b/layers/security_identity_compliance/iam_roles/main.tf similarity index 69% rename from layers/security_identity_compliance/job-function-roles/main.tf rename to layers/security_identity_compliance/iam_roles/main.tf index ac87797..eaeb3e3 100644 --- a/layers/security_identity_compliance/job-function-roles/main.tf +++ b/layers/security_identity_compliance/iam_roles/main.tf @@ -1,7 +1,7 @@ data aws_caller_identity this {} -module cloudtrail-cwl { - source = "../../../modules/security_identity_compliance/job-function-roles" +module iam-module { + source = "../../../modules/security_identity_compliance/roles_iam_resources" application = var.application environment = var.environment customer-name = var.customer-name diff --git a/layers/security_identity_compliance/job-function-roles/provider.tf b/layers/security_identity_compliance/iam_roles/provider.tf similarity index 100% rename from layers/security_identity_compliance/job-function-roles/provider.tf rename to layers/security_identity_compliance/iam_roles/provider.tf diff --git a/layers/security_identity_compliance/job-function-roles/terraform.tfvars b/layers/security_identity_compliance/iam_roles/terraform.tfvars similarity index 100% rename from layers/security_identity_compliance/job-function-roles/terraform.tfvars rename to layers/security_identity_compliance/iam_roles/terraform.tfvars diff --git a/layers/security_identity_compliance/job-function-roles/variables.tf b/layers/security_identity_compliance/iam_roles/variables.tf similarity index 100% rename from layers/security_identity_compliance/job-function-roles/variables.tf rename to layers/security_identity_compliance/iam_roles/variables.tf diff --git a/modules/security_identity_compliance/roles_iam_resources/access-analyzer.tf b/modules/security_identity_compliance/roles_iam_resources/access-analyzer.tf new file mode 100644 index 0000000..9a74114 --- /dev/null +++ b/modules/security_identity_compliance/roles_iam_resources/access-analyzer.tf @@ -0,0 +1,4 @@ +resource "aws_accessanalyzer_analyzer" "iam-aa" { + analyzer_name = "IAMAcecssAnalyzer" + tags = var.default-tags +} \ No newline at end of file diff --git a/modules/security_identity_compliance/roles_iam_resources/iam-password-policy.tf b/modules/security_identity_compliance/roles_iam_resources/iam-password-policy.tf new file mode 100644 index 0000000..c2d22cc --- /dev/null +++ b/modules/security_identity_compliance/roles_iam_resources/iam-password-policy.tf @@ -0,0 +1,11 @@ +resource "aws_iam_account_password_policy" "password-policy1" { + minimum_password_length = 14 + require_lowercase_characters = true + require_numbers = true + require_uppercase_characters = true + require_symbols = true + allow_users_to_change_password = true + max_password_age = 90 + password_reuse_prevention = 24 + hard_expiry = true +} \ No newline at end of file diff --git a/modules/security_identity_compliance/job-function-roles/main.tf b/modules/security_identity_compliance/roles_iam_resources/main.tf similarity index 100% rename from modules/security_identity_compliance/job-function-roles/main.tf rename to modules/security_identity_compliance/roles_iam_resources/main.tf diff --git a/modules/security_identity_compliance/job-function-roles/variables.tf b/modules/security_identity_compliance/roles_iam_resources/variables.tf similarity index 100% rename from modules/security_identity_compliance/job-function-roles/variables.tf rename to modules/security_identity_compliance/roles_iam_resources/variables.tf