All Projects → MitocGroup → Terraform Aws Landing Zone

MitocGroup / Terraform Aws Landing Zone

Licence: mpl-2.0
Terraform Module for AWS Landing Zone

Projects that are alternatives of or similar to Terraform Aws Landing Zone

Terraform With Circleci Example
This is an example of automatic deployments of your infrastructure using terraform and CircleCI 2.0 workflows
Stars: ✭ 142 (+0%)
Mutual labels:  terraform, hcl, infrastructure-as-code, infrastructure
Terraform Aws Cross Account Role
A Terraform module to create an IAM Role for Cross Account delegation.
Stars: ✭ 30 (-78.87%)
Mutual labels:  amazon-web-services, terraform, hcl
Terraform Modules
Terraform Modules
Stars: ✭ 25 (-82.39%)
Mutual labels:  terraform, hcl, infrastructure-as-code
Infra Personal
Terraform for setting up my personal infrastructure
Stars: ✭ 45 (-68.31%)
Mutual labels:  terraform, hcl, infrastructure
Aws
A collection of bash shell scripts for automating various tasks with Amazon Web Services using the AWS CLI and jq.
Stars: ✭ 493 (+247.18%)
Mutual labels:  amazon, terraform, infrastructure-as-code
Red Baron
Automate creating resilient, disposable, secure and agile infrastructure for Red Teams.
Stars: ✭ 662 (+366.2%)
Mutual labels:  terraform, hcl, infrastructure-as-code
Karch
A Terraform module to create and maintain Kubernetes clusters on AWS easily, relying entirely on kops
Stars: ✭ 38 (-73.24%)
Mutual labels:  terraform, hcl, infrastructure-as-code
Iam Policy Json To Terraform
Small tool to convert an IAM Policy in JSON format into a Terraform aws_iam_policy_document
Stars: ✭ 282 (+98.59%)
Mutual labels:  terraform, hcl, infrastructure-as-code
Mikado
🤖💨Mikado helps managing your AWS infrastructure for WordPress sites by defining an out-of-box, highly available, easy-to-deploy setup
Stars: ✭ 80 (-43.66%)
Mutual labels:  terraform, hcl, infrastructure
Toc
A Table of Contents of all Gruntwork Code
Stars: ✭ 111 (-21.83%)
Mutual labels:  terraform, infrastructure-as-code, infrastructure
Terrascan
Detect compliance and security violations across Infrastructure as Code to mitigate risk before provisioning cloud native infrastructure.
Stars: ✭ 2,687 (+1792.25%)
Mutual labels:  terraform, infrastructure-as-code, infrastructure
Terraformer
CLI tool to generate terraform files from existing infrastructure (reverse Terraform). Infrastructure to Code
Stars: ✭ 6,316 (+4347.89%)
Mutual labels:  terraform, hcl, infrastructure-as-code
Terratag
Terratag is a CLI tool that enables users of Terraform to automatically create and maintain tags across their entire set of AWS, Azure, and GCP resources
Stars: ✭ 385 (+171.13%)
Mutual labels:  terraform, hcl, infrastructure-as-code
Terraform Best Practices
Terraform Best Practices for AWS users
Stars: ✭ 931 (+555.63%)
Mutual labels:  terraform, hcl, infrastructure-as-code
Terraform Aws Gitlab Runner
Terraform module for AWS GitLab runners on ec2 (spot) instances
Stars: ✭ 292 (+105.63%)
Mutual labels:  terraform, hcl, infrastructure-as-code
Terraform Sqs Lambda Trigger Example
Example on how to create a AWS Lambda triggered by SQS in Terraform
Stars: ✭ 31 (-78.17%)
Mutual labels:  terraform, hcl, infrastructure-as-code
stein
A linter for config files with a customizable rule set
Stars: ✭ 92 (-35.21%)
Mutual labels:  infrastructure, hcl, infrastructure-as-code
terraform-vsphere-single-vm
Deploy single vSphere VM with Terraform - template.
Stars: ✭ 21 (-85.21%)
Mutual labels:  infrastructure, hcl, infrastructure-as-code
Terraform Aws Asg
Terraform AWS Auto Scaling Stack
Stars: ✭ 58 (-59.15%)
Mutual labels:  terraform, hcl, infrastructure-as-code
Terraform
Terraform automation for Cloud
Stars: ✭ 121 (-14.79%)
Mutual labels:  terraform, hcl, infrastructure-as-code

terraform module landing-zone

AWS Landing Zone is a solution that helps customers more quickly set up a secure, multi-account AWS environment based on AWS best practices. This repository contains terraform module landing_zone that dynamically deploys components of AWS Landing Zone solution based on input list of .tfvars files.

RELATED: terraform module landing_zone_reader

NOTE: Current implementation is fully compatible with terraform v0.12+. Switch to branch terraform_v0.11 if you still using terraform v0.11.x and below.

Quick Links: How Does This Module Work | What Components Are Available | Why to Use This Solution

How Does This Module Work

Terraform module landing_zone is based on standard module structure guidelines and contains the following folders:

  • root folder - module's standard terraform configuration
  • components - yaml-based and terraform compatible configurations
  • examples - different ways to combine components as part of this module
  • modules - standalone, reusable and production-ready modules
  • tests - set of automated tests to use in CI/CD pipelines

This terraform module requires the following prerequisites / dependencies:

To get started, simply include main.tf into your terraform codebase:

module "landing_zone" {
  source  = "MitocGroup/landing-zone/aws"
  version = "0.2.5"
  landing_zone_providers  = var.landing_zone_providers
  landing_zone_components = var.landing_zone_components
  terraform_backend       = var.terraform_backend
}

NOTE: Make sure to include variables.tf and optionally terraform.tfvars

To simplify and make it easier to understand, we included default values in terraform.tfvars:

landing_zone_providers = {
  default = {
    account_id = "123456789012"
    region     = "us-east-1"
  }
  [...]
}
landing_zone_components = {
  landing_zone_vpc = "s3://terraform-aws-landing-zone/components/landing_zone_vpc/*.tfvars"
  [...]
}
terraform_backend = {
  backend = "local"
  path    = "/tmp/.terrahub/landing_zone"
}

NOTE: Placeholder [...] from above is used to suggest that similar syntax can be added. Remove it or update in order to have valid HCL / terraform configuration.

This means that before you use this terraform module, you will need to:

  1. Change landing_zone_providers to values that describe your AWS Organization account
    • default reflects the default setup corresponding to AWS Organization account; add more providers by extending landing_zone_providers map with extra AWS accounts and/or AWS regions
      • account_id reflects the AWS account used to deploy AWS resources; prevents provisioning AWS resources into wrong AWS account in case of valid AWS credentials
      • region reflects the AWS region used to deploy AWS resources; create 2 different providers for the same AWS account, but different AWS regions
  2. Change landing_zone_components to values that fit into your AWS Landing Zone use case
    • each key from landing_zone_components map represents the name of the component from this list of available components
    • each value from landing_zone_components map represents the path to .tfvars file on S3 and/or local disk
      • each .tfvars file must use HCL format; DO NOT USE other formats like JSON or YAML
  3. Change terraform_backend to values that reflect your terraform backend where .tfstate files are stored (in variables.tf default parameter value is defined as local)

NOTE: Terraform module landing_zone can have tens, hundreds or thousands of deployable components, but not all of them should be and will be deployed. At runtime, components that are not part of landing_zone_components variable will be ignored.

More Examples

What Components Are Available

AWS Landing Zone solution is defined by the following strategy:

  1. Multi-Account Structure
    • AWS Organization Account
    • Shared Services Account
    • Log Archive Account
    • Security Account
  2. Account Vending Machine
  3. User Access and Identity Management
  4. Monitoring and Notifications

NOTE: Current implementation of this terraform module covers only Multi-Account Structure components (work in progress).

Multi-Account Structure

AWS Landing Zone Multi-Account Architecture

Based on the multi-account architecture, here below are currently available components:

  1. landing_zone_pipeline_s3_bucket
  2. landing_zone_pipeline_artifact_s3_bucket
  3. landing_zone_code_pipeline
  4. landing_zone_code_pipeline_role
  5. landing_zone_code_pipeline_role_policy
  6. landing_zone_code_build
  7. landing_zone_code_build_role
  8. landing_zone_code_build_role_policy
  9. landing_zone_organization
  10. landing_zone_organization_policy
  11. landing_zone_organization_policy_attachment
  12. landing_zone_organization_accounts
  13. landing_zone_organization_unit

Account Vending Machine

AWS Landing Zone Account Vending Machine Architecture

Based on the account vending machine architecture, here below are currently available components:

  1. Coming soon ...

User Access and Identity Management

AWS Landing Zone User Access and Identity Management Architecture

Based on the user access architecture, here below are currently available components:

  1. landing_zone_iam_role
  2. landing_zone_iam_policy
  3. landing_zone_iam_role_policy_attachment
  4. landing_zone_sso
  5. landing_zone_directory_service_director

NOTE: This solution is relying on cross-account role called OrganizationAccountAccessRole. Follow this link to learn more and/or create missing IAM role(s)...


Monitoring and Notifications

AWS Landing Zone Monitoring and Notifications Architecture

Based on the notifications architecture, here below are currently available components:

  1. Coming soon ...

Why to Use This Solution

No need for code changes

Terraform module for AWS Landing Zone solution is up to 10 lines of code that receives a list of .tfvars files as input variables which describe providers (to be read: AWS accounts and AWS regions) and configs (to be read: AWS resources)

No need for code rewrites

This implementation engages microservices architecture, allowing any component to be replaced with another component (or multiple components)

No need for hard-coded values

Existing AWS resources created by your team can be reused programmatically as read only values by other teams' terraform configurations

No need to rebuild from scratch

Existing AWS resources in your current AWS account(s) can be imported and reused without downtime by this terraform module via terraform import command

No need to exclude pieces of account(s) baseline

Some customers were avoiding in the past AWS Landing Zone because it doesn't support some kind of 3rd party SSO solution or 3rd party Logging solution. By using terraform, we can easily bring those solutions into AWS Landing Zone as a set of components and empower customers to continue using best practices of both worlds

Additionally, this module helps enforce best practices

  • By removing the need for access to AWS root account(s)
  • By using IAM cross-account roles and/or STS temporary credentials
  • By enabling centralized CloudTrail logs and cross-region replication of CloudTrail logs
  • By empowering complex organizations to separate roles and responsibilities (e.g. InfoSec team can place explicit deny on IAM, VPC, SG and STS for other teams and/or other environments like production or pre-production)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].