Skip to content

Repository files navigation

Terraform module for AWS account discovery for Stacklet

This modules creates an IAM role to allow Stacklet to discovery accounts in the organization.

Note: this must be run in the root account for the organization.

To use this module:

module "org-read" {
    source = "stacklet/onboarding-org-read/aws"
    version = "0.1.1"

    resource_prefix = "<PREFIX>"

    stacklet_external_id       = "<EXTERNAL_ID>"
    stacklet_assetdb_role_arn  = "<ASSETDB_ROLE_ARN>"
    stacklet_platform_role_arn = "<PLATFORM_ROLE_ARN>"
}

where values for the stacklet_ prefixed variables are provided by Stacklet.

Versioning

This module is published to the Terraform Registry. Set source to the registry address and pin version to a release.

version takes the usual constraint syntax. This module is pre-1.0, and on a 0.x line a minor release is where it ships breaking changes, so pin at the patch level: ~> 0.1.0 accepts 0.1.1 and later patches and holds at 0.2.0. Read the release notes before moving to a new minor.

Requirements

Name Version
terraform >= 1.14.0
aws ~> 6.2

Providers

Name Version
aws ~> 6.2

Modules

No modules.

Resources

Name Type
aws_iam_role.org_read resource
aws_iam_role_policy.tags_read resource
aws_iam_role_policy_attachments_exclusive.org_read resource
aws_iam_policy.org_readonly_access data source
aws_iam_policy_document.org_read_assume data source
aws_iam_policy_document.tags_read data source

Inputs

Name Description Type Default Required
iam_path A path for IAM created IAM roles. If set, it must include leading and trailing slashes. string "/" no
resource_prefix An arbitrary prefix prepended to names of created resources. string n/a yes
stacklet_assetdb_role_arn ARN for the role used by AssetDB - Provided by Stacklet. string n/a yes
stacklet_external_id ID of the Stacklet deployment to restrict what can assume the roles - Provided by Stacklet. string n/a yes
stacklet_platform_role_arn ARN for the role used by Platform - Provided by Stacklet. string n/a yes

Outputs

Name Description
org_read_role ARN for the account-discovery role assumed by Stacklet Platform.

Releases

Packages

Used by

Contributors

Languages