Git Product home page Git Product logo

terraform-aws-iam-role-cross-account-trusting's Introduction

terraform-aws-iam-role-cross-account-trusting

GitHub: StratusGrid/terraform-aws-iam-role-cross-account-trusting

This module creates a role that can be assumed by another principal (usually in another account, but could be user or role) to act as that role with permissions from the attached policies.

NOTE: This is the TRUSTING side. You will still need to create a policy on the TRUSTED side that allows users in that account to assume the role

Example usage of the module:

module "iam_role_cross_account_trusting_admin" {
  source         = "StratusGrid/iam-role-cross-account-trusting/aws"
  version        = "2.0.0"
  role_name      = "cross-account-role-admin"
  principal_arns = ["arn:aws:iam::ACCOUNT_ID:root"]
  policy_arns    = ["arn:aws:iam::aws:policy/AdministratorAccess"]
  input_tags     = merge(local.common_tags, {})
  require_mfa    = false
}

Resources

Name Type
aws_iam_role.cross_account_assume_role resource
aws_iam_role_policy_attachment.cross_account_assume_role resource

Inputs

Name Description Type Default Required
input_tags Map of tags to apply to resources map(string) {} no
max_session_duration Max session duration for iam role string 3600 no
policy_arns ARNs for policies attached to this role list(string) n/a yes
principal_arns ARNs of accounts, users, or roles who can assume this role list(string) n/a yes
require_mfa Boolean to determine whether the role should require users assuming it to have MFA enabled bool false no
role_name Name for the role being created string n/a yes

Outputs

Name Description
role_arn ARN of newly created role
role_assumption_url URL Shortcut to assume role in Console
role_name Name of newly created role

Note: Manual changes to the README will be overwritten when the documentation is updated. To update the documentation, run terraform-docs -c .config/.terraform-docs.yml .

terraform-aws-iam-role-cross-account-trusting's People

Contributors

djkaswa avatar ivancasco-sg avatar jason-drouhard avatar jheison-rodriguez avatar mattbarlow-sg avatar stratuschris avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.