From 797caaaa4974e7ca2406a7eab741cb06294a3478 Mon Sep 17 00:00:00 2001 From: KF Date: Thu, 20 Oct 2022 09:12:29 +0800 Subject: [PATCH] UPD: merged iam-user-pgp into iam-user module --- examples/iam.user.gpg/main.tf | 51 ---------- examples/iam.user.gpg/terraform.tfvars | 44 --------- examples/iam.user.gpg/variables.tf | 28 ------ .../iam-user-gpg/README.md | 53 ----------- .../iam-user-gpg/main.tf | 95 ------------------- .../iam-user-gpg/outputs.tf | 19 ---- .../iam-user-gpg/variables.tf | 27 ------ .../iam-user/README.md | 58 +++++++++-- .../iam-user/main.tf | 22 ++++- .../iam-user/outputs.tf | 16 ++++ .../iam-user/variables.tf | 15 ++- 11 files changed, 96 insertions(+), 332 deletions(-) delete mode 100644 examples/iam.user.gpg/main.tf delete mode 100644 examples/iam.user.gpg/terraform.tfvars delete mode 100644 examples/iam.user.gpg/variables.tf delete mode 100644 modules/security_identity_compliance/iam-user-gpg/README.md delete mode 100644 modules/security_identity_compliance/iam-user-gpg/main.tf delete mode 100644 modules/security_identity_compliance/iam-user-gpg/outputs.tf delete mode 100644 modules/security_identity_compliance/iam-user-gpg/variables.tf diff --git a/examples/iam.user.gpg/main.tf b/examples/iam.user.gpg/main.tf deleted file mode 100644 index fc0a4cc..0000000 --- a/examples/iam.user.gpg/main.tf +++ /dev/null @@ -1,51 +0,0 @@ -module iam-user { - source = "../../modules/security_identity_compliance/iam-user-gpg" - - default-tags = local.default-tags - iam-user-name = var.iam-user-name - iam-user-policy = data.aws_iam_policy_document.user-policy.json - iam-user-policy-name = "SelfServicePermissions" - create-access-key = false - create-password = true - managed-policy-arns = ["arn:aws:iam::aws:policy/job-function/ViewOnlyAccess"] - create-group = true - iam-group-name = var.iam-group-name - pgp-key = var.pgp-key -} - -data aws_iam_policy_document user-policy { - statement { - sid = "ManageOwnCredentials" - - actions = [ - "iam:ChangePassword", - "iam:CreateAccessKey", - "iam:DeleteAccessKey", - "iam:ListAccessKey", - "iam:CreateVirtualMFADevice", - "iam:EnableMFADevice", - "iam:ListMFA*", - "iam:ListVirtualMFA*", - "iam:ResyncMFADevice" - ] - - effect = "Allow" - resources = ["arn:aws:iam::account-id:user/${var.iam-user-name}"] - } -} - -output iam-user-arn { - value = module.iam-user.iam-user-arn -} - -output iam-user-pass { - value = module.iam-user.iam-user-pass -} - -output iam-user-access-key { - value = module.iam-user.iam-user-access-key -} - -output iam-user-secret-key { - value = module.iam-user.iam-user-secret-key -} \ No newline at end of file diff --git a/examples/iam.user.gpg/terraform.tfvars b/examples/iam.user.gpg/terraform.tfvars deleted file mode 100644 index 9e681df..0000000 --- a/examples/iam.user.gpg/terraform.tfvars +++ /dev/null @@ -1,44 +0,0 @@ -aws-region = "ap-southeast-1" -customer-name = "ken2026" -environment = "dev" -project = "iac" -application = "terraform" -costcenter = "none" -DynamicAddressGroup = "" -owner = "Rackspace" - -iam-user-name = "TestUser1017" -iam-group-name = "TestGroup1017" -pgp-key = <