Home

Awesome

modernisation-platform-terraform-environments

Standards Icon Format Code Icon Scorecards IconSCA Icon Terraform SCA Icon

This repository holds a Terraform module that creates organisational units and accounts for environments.

Usage

module "environments" {
  source                             = "github.com/ministryofjustice/modernisation-platform-terraform-environments"
  environment_directory              = "./environments"
  environment_parent_organisation_id = "ou-123456789"
  environment_prefix                 = "modernisation-platform"
}
<!-- BEGIN_TF_DOCS -->

Requirements

NameVersion
<a name="requirement_terraform"></a> terraform>= 1.0.1
<a name="requirement_aws"></a> aws>= 3.47.0
<a name="requirement_random"></a> random>= 3.0.0

Providers

NameVersion
<a name="provider_aws"></a> aws>= 3.47.0
<a name="provider_random"></a> random>= 3.0.0

Modules

No modules.

Resources

NameType
aws_organizations_account.accountsresource
aws_organizations_organizational_unit.applicationsresource
aws_organizations_organizational_unit.platforms-and-architecture-modernisation-platform-coreresource
aws_organizations_organizational_unit.platforms-and-architecture-modernisation-platform-memberresource
aws_organizations_organizational_unit.platforms-and-architecture-modernisation-platform-member-unrestrictedresource
random_string.email-addressresource

Inputs

NameDescriptionTypeDefaultRequired
<a name="input_environment_directory"></a> environment_directoryDirectory path for environment definitionsstringn/ayes
<a name="input_environment_parent_organisation_id"></a> environment_parent_organisation_idOrganisation ID for newly configured environments to sit withinstringn/ayes
<a name="input_environment_prefix"></a> environment_prefixPrefix for all new environment and account namesstringn/ayes

Outputs

NameDescription
<a name="output_environment_account_ids"></a> environment_account_idsMap of account keys and their IDs (e.g. { account_name => 1234567890 })
<a name="output_environment_nuke_accounts"></a> environment_nuke_accountsList of autonuke account names.
<a name="output_environment_nuke_blocklist_accounts"></a> environment_nuke_blocklist_accountsList of account names blocklisted from autonuke.
<a name="output_environment_rebuild_after_nuke_accounts"></a> environment_rebuild_after_nuke_accountsList of rebuild-after-autonuke account names.
<a name="output_modernisation_platform_core_ou_id"></a> modernisation_platform_core_ou_idn/a
<a name="output_modernisation_platform_member_ou_id"></a> modernisation_platform_member_ou_idn/a
<a name="output_modernisation_platform_member_unrestricted_ou_id"></a> modernisation_platform_member_unrestricted_ou_idn/a
<!-- END_TF_DOCS -->

Looking for issues?

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