Skip to content

Commit

Permalink
add exmaples
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jun 30, 2022
1 parent 75d6e68 commit 4a3bad0
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 0 deletions.
29 changes: 29 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_admin_bond0001"></a> [admin\_bond0001](#module\_admin\_bond0001) | git@github.e.it.census.gov:terraform-modules/aws-iam-user.git | n/a |
| <a name="module_service_apps"></a> [service\_apps](#module\_service\_apps) | git@github.e.it.census.gov:terraform-modules/aws-iam-user.git | n/a |
| <a name="module_user_bond0001"></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 |
|------|-------------|
| <a name="output_admin_bond0001"></a> [admin\_bond0001](#output\_admin\_bond0001) | Admin username bond0001 module output |
28 changes: 28 additions & 0 deletions examples/admin-user.bond0001.tf
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 16 additions & 0 deletions examples/service.org_apps.tf
Original file line number Diff line number Diff line change
@@ -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]
}
16 changes: 16 additions & 0 deletions examples/user.bond0001.tf
Original file line number Diff line number Diff line change
@@ -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 = {}
}

0 comments on commit 4a3bad0

Please sign in to comment.