Code Monkey home page Code Monkey logo

terraform-aws-enforce-mfa's Introduction

Module TERRAFORM-AWS-ENFORCE-MFA

Terraform module terraform-aws-enforce-mfa

Maintenance

Documentations

Optional .aws/config setup and aws-vault

[profile personal]
region=us-west-2
output=json

[profile work]
region=us-west-1
output=json

[profile work]
source_profile = work
mfa_serial = arn:aws:iam::<account>:mfa/<username>
credential_process = aws-vault exec work --json

[profile personal]
source_profile = personal
mfa_serial = arn:aws:iam::<account>:mfa/<username>
credential_process = aws-vault exec work --json

Usage example

Here's the gist of using it directly from github.

data aws_caller_identity current {}

resource aws_iam_group support {
  name =  "support"
}

module enforce_mfa {
  source  = "terraform-module/enforce-mfa/aws"
  version = "0.12.0"

  policy_name                     = "managed-mfa-enforce"
  account_id                      = data.aws_caller_identity.current.id
  groups                          = [aws_iam_group.support.name]
  manage_own_signing_certificates  = true
  manage_own_ssh_public_keys      = true
  manage_own_git_credentials      = true
}

Assumptions

Available features

Module Variables

Requirements

Name Version
terraform >= 0.12

Providers

Name Version
aws n/a

Inputs

Name Description Type Default Required
account_id Account identification. (Optional, default '*') string "*" no
groups Enforce MFA for the members in these groups. (Optional, default '[]') list(string) [] no
manage_explicit_deny Manage explicit deny. bool false no
manage_own_access_keys Allow a new AWS secret access key and corresponding AWS access key ID for the specified user. bool false no
manage_own_git_credentials Allow managing git credentials. bool false no
manage_own_signing_certificates Allow managing signing certificates. bool false no
manage_own_ssh_public_keys Allow managing ssh public keys. bool false no
path Path in which to create the policy. (Optional, default '/') string "/" no
policy_name The name of the policy. string "managed-force-mfa-policy" no

Outputs

Name Description
arn The policy's ARN.
groups The groups to which policy is attached
id The policy's ID.
policy_json The above arguments serialized as a standard JSON policy document.

Commands

$ make help 
hooks                          Commit hooks setup
validate                       Validate with pre-commit hooks
changelog                      Update changelog 

๐Ÿ“ Guidelines

  • ๐Ÿ“ Use a succinct title and description.
  • ๐Ÿ› Bugs & feature requests can be be opened
  • ๐Ÿ“ถ Support questions are better asked on Stack Overflow
  • ๐Ÿ˜Š Be nice, civil and polite (as always).

License

Copyright 2019 Ivan Katliarhcuk

MIT Licensed. See LICENSE for full details.

How to Contribute

Submit a pull request

Authors

Currently maintained by Ivan Katliarchuk and these awesome contributors.

ForTheBadge uses-git

Terraform Registry

terraform-aws-enforce-mfa's People

Contributors

ivankatliarchuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.