Skip to content

lablabs/terraform-aws-organization

Repository files navigation

AWS Organization Terraform module

labyrinth labs logo

We help companies build, run, deploy and scale software and infrastructure by embracing the right technologies and principles. Check out our website at https://lablabs.io/


Terraform validation pre-commit

Description

Terraform module which sets up AWS Organization in the root account.

Requirements

Name Version
terraform >= 0.13
aws >= 2.0

Modules

No Modules.

Resources

Name
aws_organizations_account
aws_organizations_organization
aws_organizations_organizational_unit

Inputs

Name Description Type Default Required
organization_accounts Map of organization accounts to create. The map key is the name of the account and the value is an object containing account configuration variables. any n/a yes
organization_aws_service_access_principals n/a list
[
"cloudtrail.amazonaws.com",
"sso.amazonaws.com"
]
no
organization_enabled_policy_types List of Organizations policy types to enable in the Organization Root. Organization must have feature_set set to ALL. For additional information about valid policy types (e.g. AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, SERVICE_CONTROL_POLICY, and TAG_POLICY list(string)
[
"SERVICE_CONTROL_POLICY"
]
no
organization_feature_set Specify ALL or CONSOLIDATED_BILLING string "ALL" no
organization_units Create flat organization units list(string)
[
"default"
]
no

Outputs

Name Description
aws_organizations_account Map of the organization accounts attributes where key is account name
aws_organizations_organizational_unit Map of the organization units attributes where key is ou name
organization AWS organization attributes
organization_all_accounts Map of the organization units attributes where key is account name
organization_all_organizational_units Map of the organization units attributes where key is ou name
organization_master_account_id Management account id

Contributing and reporting issues

Feel free to create an issue in this repository if you have questions, suggestions or feature requests.

Validation, linters and pull-requests

We want to provide high quality code and modules. For this reason we are using several pre-commit hooks and GitHub Actions workflow. A pull-request to the master branch will trigger these validations and lints automatically. Please check your code before you will create pull-requests. See pre-commit documentation and GitHub Actions documentation for further details.

License

License

See LICENSE for full details.

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.