Skip to content

Module for creating an IAM role that can be assumed from another account • This repository is defined and managed in Terraform

License

Notifications You must be signed in to change notification settings

ministryofjustice/modernisation-platform-terraform-cross-account-access

Repository files navigation

Modernisation Platform Terraform Cross Account Access Module

Standards Icon Format Code Icon Scorecards IconSCA Icon Terraform SCA Icon

A simple Terraform module to configure an IAM role that is assumable from another account.

Usage

module "cross-account-access" {
  source     = "github.com/ministryofjustice/modernisation-platform-terraform-cross-account-access"
  account_id = "123456789"
  policy_arn = "arn:aws:iam::aws:policy/ReadOnlyAccess"
  role_name  = "CrossAccountAccess"
}

Requirements

Name Version
terraform >=1.0.1
aws ~> 5.0

Providers

Name Version
aws ~> 5.0

Modules

No modules.

Resources

Name Type
aws_iam_role.default resource
aws_iam_role_policy_attachment.default resource
aws_iam_policy_document.assume-role-policy data source
aws_iam_policy_document.combined-assume-role-policy data source

Inputs

Name Description Type Default Required
account_id Account ID to give access to string n/a yes
additional_trust_roles ARN of other roles to be passed as principals for sts:AssumeRole list(string) [] no
additional_trust_statements Json attributes of additional iam policy documents to add to the trust policy list(string) [] no
policy_arn Policy ARN for the assumable role. Defaults to arn:aws:iam::aws:policy/ReadOnlyAccess string "arn:aws:iam::aws:policy/ReadOnlyAccess" no
role_name Name of assumable role string n/a yes

Outputs

Name Description
role_arn n/a

Looking for issues?

If you're looking to raise an issue with this module, please create a new issue in the Modernisation Platform repository.

About

Module for creating an IAM role that can be assumed from another account • This repository is defined and managed in Terraform

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published