Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconcodegen
file-type-iconexamples
file-type-iconcloudtrail
file-type-iconcloudwatch-logs-metric-filters
file-type-iconcross-account-iam-roles
file-type-iconcustom-iam-entity
file-type-iconterraform
file-type-iconterragrunt
file-type-iconREADME.md
file-type-iconterragrunt.hcl
file-type-iconiam-groups
file-type-iconiam-password-policy
file-type-iconsaml-iam-roles
file-type-iconsecurityhub
file-type-iconmodules
file-type-iconrfcs
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconCONTRIBUTING.md
file-type-iconLICENSE.txt
file-type-iconREADME.adoc
file-type-iconsetup.cfg

Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconcodegen
file-type-iconexamples
file-type-iconcloudtrail
file-type-iconcloudwatch-logs-metric-filters
file-type-iconcross-account-iam-roles
file-type-iconcustom-iam-entity
file-type-iconterraform
file-type-iconterragrunt
file-type-iconREADME.md
file-type-iconterragrunt.hcl
file-type-iconiam-groups
file-type-iconiam-password-policy
file-type-iconsaml-iam-roles
file-type-iconsecurityhub
file-type-iconmodules
file-type-iconrfcs
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconCONTRIBUTING.md
file-type-iconLICENSE.txt
file-type-iconREADME.adoc
file-type-iconsetup.cfg
CIS Foundations Benchmark

CIS Foundations Benchmark

Modules and utilities certified by Gruntwork and CIS to comply with the CIS AWS Foundations Benchmark

Code Preview

Preview the Code

mobile file icon

README.md

down

Custom IAM Entity Terragrunt wrapper Example

This is an example of how to use the custom-iam-entity module to create an IAM group or role with attached IAM policies. If you're not using Terragrunt, see the terraform example.

If you're using this example as part of a larger terragrunt repository, copy it to the appropriate location within the repo. For example, the hierarchy below demonstrates a structure of four accounts: dev, master, prod, and security.

.
├── dev
│   └── us-east-1
│       └── dev
├── master
├── prod
│   └── _global
│       └── custom-iam-entity
│           └── terragrunt.hcl
│   └── us-east-1
│       ├── prod
│       └── region.yaml
└── security
    └── us-east-1
        └── dev

The example is nested under the prod account, _global configuration because IAM groups apply to an entire AWS account.

Quick start

  1. Copy this module to a location in your terragrunt repository, as described above.
  2. Configure the input variables
  3. Run terragrunt apply

For a description of the purpose of each variable, see the module's variables.tf.

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?