diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..1e1f3e7 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,29 @@ +## Requirements + +No requirements. + +## Providers + +No providers. + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [admin\_bond0001](#module\_admin\_bond0001) | git@github.e.it.census.gov:terraform-modules/aws-iam-user.git | n/a | +| [service\_apps](#module\_service\_apps) | git@github.e.it.census.gov:terraform-modules/aws-iam-user.git | n/a | +| [user\_bond0001](#module\_user\_bond0001) | git@github.e.it.census.gov:terraform-modules/aws-iam-user.git | n/a | + +## Resources + +No resources. + +## Inputs + +No inputs. + +## Outputs + +| Name | Description | +|------|-------------| +| [admin\_bond0001](#output\_admin\_bond0001) | Admin username bond0001 module output | diff --git a/examples/admin-user.bond0001.tf b/examples/admin-user.bond0001.tf new file mode 100644 index 0000000..2f3937a --- /dev/null +++ b/examples/admin-user.bond0001.tf @@ -0,0 +1,28 @@ +module "admin_bond0001" { + source = "git@github.e.it.census.gov:terraform-modules/aws-iam-user.git" + + username = "bond0001" + profile = var.profile + iam_username = "a-bond0001" + email_address = "" + reference = "" + groups = [module.group_cloud-admin.group_name, module.group_ip-restriction.group_name] + service_account = false + generate_password = false + pgp_key_file = "./init/tf-gpg-key.b64" + create_access_keys = false + tags = {} +} + +output "admin_bond0001" { + description = "Admin username bond0001 module output" + value = module.admin_bond0001 +} + +# To get the passwords, run the script +# +# .terraform/modules/admin_bond0001/bin/show-user-info.sh "admin_bond0001" +# +# this will output the user_name, user_arn, and user_password. The password must now be +# distributed to the use. It is required to be changed on first login. That first login +# should also include setting MFA. diff --git a/examples/service.org_apps.tf b/examples/service.org_apps.tf new file mode 100644 index 0000000..d1c388c --- /dev/null +++ b/examples/service.org_apps.tf @@ -0,0 +1,16 @@ +module "service_apps" { + source = "git@github.e.it.census.gov:terraform-modules/aws-iam-user.git" + + profile = var.profile + iam_username = "s-org-apps" + # concat username and emil + username = "bond0001" + email_address = "james.bond@census.gov" + groups = [module.group_ip-restriction.group_name] + generate_password = false + pgp_key_file = "init/tf-gpg-key.b64" + service_account = true + enable_sending_mail = false + create_access_keys = true + attached_policies = [aws_iam_policy.apps.arn] +} diff --git a/examples/user.bond0001.tf b/examples/user.bond0001.tf new file mode 100644 index 0000000..a07a8c5 --- /dev/null +++ b/examples/user.bond0001.tf @@ -0,0 +1,16 @@ +module "user_bond0001" { + source = "git@github.e.it.census.gov:terraform-modules/aws-iam-user.git" + + profile = var.profile + username = "bond0001" + iam_username = format("u-%v", each.key) + email_address = "" + reference = "REQ000009999999" + groups = [module.group.group_name, "g-ip-address-restriction"] + service_account = false + generate_password = false + # pgp_key = file("./init/tf-gpg-key.b64") + pgp_key_file = "./init/tf-gpg-key.b64" + create_access_keys = true + tags = {} +}