SlideShare a Scribd company logo
Hands-On
Terraform Module for
AWS Landing Zone
registry.terraform.io/modules/MitocGroup/landing-zone
2018: AWS Landing Zone
Secure Multi-Accounts Strategy
AWS Landing Zone is a solution that helps customers more quickly set up
a secure, multi-account AWS environment based on AWS best practices.
https://aws.amazon.com/solutions/aws-landing-zone
AWS Landing Zone  AWS Control Tower
2019: AWS Control Tower
“AWS Landing Zone” as a Service
AWS Control Tower provides the easiest way to set up and govern a
new, secure, multi-account AWS environment based on best practices
established through AWS’ experience working with thousands of
enterprises as they move to the cloud.
https://aws.amazon.com/controltower
AWS Landing Zone  AWS Control Tower
Existing Resources
Although CloudFormation
added recently the ability to
import existing resources,
current ALZ implementation
still doesn’t support an easy
and flexible process to reuse
existing AWS environments.
Customers Feedback (1/3)
Below are 3 key issues identified by enterprise customers
working hands-on with our professional services organization.
AWS Single Sign-On
Although AWS SSO is an
amazing service, most of our
customers would not replace
their existing SSO solutions.
Current ALZ implementation
doesn’t allow switching it with
something like Azure AD, Okta
or PingIdentity.
CloudFormation
Enterprise customers who are
already using Terraform as
their default infrastructure-as-
code solution often avoid
CloudFormation based
implementations, justifying as
out of scope.
Customers Feedback (2/3)
Below are 3 key issues identified by enterprise customers
working hands-on with our professional services organization.
Existing Resources
Although CloudFormation
added recently the ability to
import existing resources,
current ALZ implementation
still doesn’t support an easy
and flexible process to reuse
existing AWS environments.
AWS Single Sign-On
Although AWS SSO is an
amazing service, most of our
customers would not replace
their existing SSO solutions.
Current ALZ implementation
doesn’t allow switching it with
something like Azure AD, Okta
or PingIdentity.
CloudFormation
Enterprise customers who are
already using Terraform as
their default infrastructure-as-
code solution often avoid
CloudFormation based
implementations, justifying as
out of scope.
Existing Resources
Although CloudFormation
added recently the ability to
import existing resources,
current ALZ implementation
still doesn’t support an easy
and flexible process to reuse
existing AWS environments.
Customers Feedback (3/3)
Below are 3 key issues identified by enterprise customers
working hands-on with our professional services organization.
AWS Single Sign-On
Although AWS SSO is an
amazing service, most of our
customers would not replace
their existing SSO solutions.
Current ALZ implementation
doesn’t allow switching it with
something like Azure AD, Okta
or PingIdentity.
CloudFormation
Enterprise customers who are
already using Terraform as
their default infrastructure-as-
code solution often avoid
CloudFormation based
implementations, justifying as
out of scope.
About Presenter
Eugene
ISTRATI
@eistrati
▪ CTO, Tech Partner @ Mitoc Group
▪ Ex-AWS, ex-Hearst, ex-GrubHub
▪ Certified AWS Solutions Architect
▪ 20 Years in IT; 10 Years in Cloud
Computing; 5 Years in Enterprise IT
▪ Focusing on: Automation, DevOps,
Serverless
Terraform Module for
AWS Landing Zone
https://registry.terraform.io/modules/MitocGroup/landing-zone
1. ALZ Module’s Providers
2. ALZ Module’s Components
3. ALZ Module’s TFVARs
4. ALZ Module’s Terraform Backend
5. Light Demo: ALZ Module in Action
https://registry.terraform.io/modules/MitocGroup/landing-zone
https://registry.terraform.io/modules/MitocGroup/landing-zone
▪ Publicly available on TF Registry:
https://registry.terraform.io
CODE EDITOR
module "landing_zone" {
source = "MitocGroup/landing-zone/aws"
version = "0.2.4"
landing_zone_providers = var.landing_zone_providers
landing_zone_components = var.landing_zone_components
terraform_backend = var.terraform_backend
}
Landing Zone Module’s Anatomy (1/3)
▪ Publicly available on TF Registry:
https://registry.terraform.io
▪ Expected input: list of providers
and components
CODE EDITOR
module "landing_zone" {
source = "MitocGroup/landing-zone/aws"
version = "0.2.4"
landing_zone_providers = var.landing_zone_providers
landing_zone_components = var.landing_zone_components
terraform_backend = var.terraform_backend
}
Landing Zone Module’s Anatomy (2/3)
▪ Publicly available on TF Registry:
https://registry.terraform.io
▪ Expected input: list of providers
and components
▪ Optional input: terraform
backend
CODE EDITOR
module "landing_zone" {
source = "MitocGroup/landing-zone/aws"
version = "0.2.4"
landing_zone_providers = var.landing_zone_providers
landing_zone_components = var.landing_zone_components
terraform_backend = var.terraform_backend
}
Landing Zone Module’s Anatomy (3/3)
ALZ Module’s Providers
1 Module’s Provider === 1 AWS Account + Region
▪ Required: default provider
CODE EDITOR
landing_zone_providers = {
default = {
account_id = "123456789012"
region = "us-east-1"
},
security_account = {
account_id = ”987654321098"
region = "us-west-2"
}
[...]
}
Landing Zone Module’s Providers (1/5)
▪ Required: default provider
– AWS account’s ID
– Account’s default region
CODE EDITOR
landing_zone_providers = {
default = {
account_id = "123456789012"
region = "us-east-1"
},
security_account = {
account_id = ”987654321098"
region = "us-west-2"
}
[...]
}
Landing Zone Module’s Providers (2/5)
▪ Required: default provider
– AWS account’s ID
– Account’s default region
▪ Required: another provider
CODE EDITOR
landing_zone_providers = {
default = {
account_id = "123456789012"
region = "us-east-1"
},
security_account = {
account_id = ”987654321098"
region = "us-west-2"
}
[...]
}
Landing Zone Module’s Providers (3/5)
▪ Required: default provider
– AWS account’s ID
– Account’s default region
▪ Required: another provider
– AWS account’s ID
– Account’s default region
CODE EDITOR
landing_zone_providers = {
default = {
account_id = "123456789012"
region = "us-east-1"
},
security_account = {
account_id = ”987654321098"
region = "us-west-2"
}
[...]
}
Landing Zone Module’s Providers (4/5)
▪ Required: default provider
– AWS account’s ID
– Account’s default region
▪ Required: another provider
– AWS account’s ID
– Account’s default region
▪ Provider’s key name is used as
prefix in landing zone variables
CODE EDITOR
landing_zone_providers = {
default = {
account_id = "123456789012"
region = "us-east-1"
},
security_account = {
account_id = ”987654321098"
region = "us-west-2"
}
[...]
}
Landing Zone Module’s Providers (5/5)
ALZ Module’s Components
Microservices Architecture + Immutable TF Configurations
▪ Immutable LZ components –
shifted focus from TF to TFVAR
CODE EDITOR
landing_zone_components = {
landing_zone_vpc = ”default.tfvars"
landing_zone_subnet = ”default.tfvars”
[…]
}
Landing Zone Module’s Components (1/3)
▪ Immutable LZ components –
shifted focus from TF to TFVAR
▪ Can be local or remote (on S3)
CODE EDITOR
landing_zone_components = {
landing_zone_vpc = "s3://terraform-aws-landing-
zone/components/landing_zone_vpc/default.tfvars"
landing_zone_subnet = "default.tfvars”
[…]
}
Landing Zone Module’s Components (2/3)
▪ Immutable LZ components –
shifted focus from TF to TFVAR
▪ Can be local or remote (on S3)
▪ Can be 1 TFVAR or multiple
CODE EDITOR
landing_zone_components = {
landing_zone_vpc = "s3://terraform-aws-landing-
zone/components/landing_zone_vpc/default.tfvars"
landing_zone_subnet = "s3://terraform-aws-landing-
zone/components/landing_zone_subnet/*.tfvars”
[…]
}
Landing Zone Module’s Components (3/3)
ALZ Module’s TFVARs
▪ List providers supported by
current component
CODE EDITOR
landing_zone_providers = ["default"]
default_provider = {
landing_zone_vpc_resource = {
config_0 = {
cidr_block = "172.16.0.0/16"
instance_tenancy = "default"
enable_dns_support = "true"
enable_classiclink = "false"
enable_dns_hostnames = "false"
enable_classiclink_dns_support = "false"
}
}
}
Landing Zone Module’s TFVARs (1/5)
▪ List providers supported by
current component
▪ Define provider’s values as
`[provider_key_name]_provider`
CODE EDITOR
landing_zone_providers = ["default"]
default_provider = {
landing_zone_vpc_resource = {
config_0 = {
cidr_block = "172.16.0.0/16"
instance_tenancy = "default"
enable_dns_support = "true"
enable_classiclink = "false"
enable_dns_hostnames = "false"
enable_classiclink_dns_support = "false"
}
}
}
Landing Zone Module’s TFVARs (2/5)
▪ List providers supported by
current component
▪ Define provider’s values as
`[provider_key_name]_provider`
▪ Define component’s values as
`[component_key_name]_resource`
CODE EDITOR
landing_zone_providers = ["default"]
default_provider = {
landing_zone_vpc_resource = {
config_0 = {
cidr_block = "172.16.0.0/16"
instance_tenancy = "default"
enable_dns_support = "true"
enable_classiclink = "false"
enable_dns_hostnames = "false"
enable_classiclink_dns_support = "false"
}
}
}
Landing Zone Module’s TFVARs (3/5)
▪ List providers supported by
current component
▪ Define provider’s values as
`[provider_key_name]_provider`
▪ Define component’s values as
`[component_key_name]_resource`
▪ Define each resource as iteratable
config: `config_0`, `config_1`, etc
CODE EDITOR
landing_zone_providers = ["default"]
default_provider = {
landing_zone_vpc_resource = {
config_0 = {
cidr_block = "172.16.0.0/16"
instance_tenancy = "default"
enable_dns_support = "true"
enable_classiclink = "false"
enable_dns_hostnames = "false"
enable_classiclink_dns_support = "false"
}
}
}
Landing Zone Module’s TFVARs (4/5)
▪ List providers supported by
current component
▪ Define provider’s values as
`[provider_key_name]_provider`
▪ Define component’s values as
`[component_key_name]_resource`
▪ Define each resource as iteratable
config: `config_0`, `config_1`, etc
▪ Define resource specific
key value pairs
CODE EDITOR
landing_zone_providers = ["default"]
default_provider = {
landing_zone_vpc_resource = {
config_0 = {
cidr_block = "172.16.0.0/16"
instance_tenancy = "default"
enable_dns_support = "true"
enable_classiclink = "false"
enable_dns_hostnames = "false"
enable_classiclink_dns_support = "false"
}
}
}
Landing Zone Module’s TFVARs (5/5)
ALZ Module’s
Terraform Backend
(optional)
CODE EDITOR
terraform_backend = {
backend = "local"
path = "/tmp/.terrahub/landing_zone"
}
Landing Zone Module’s Backend (1/2)
CODE EDITOR
terraform_backend = {
backend = "s3"
region = "us-east-1"
bucket = "terraform-aws-landing-zone"
key = "components"
}
CODE EDITOR
terraform_backend = {
backend = "local"
path = "/tmp/.terrahub/landing_zone"
}
Landing Zone Module’s Backend (2/2)
CODE EDITOR
terraform_backend = {
backend = "s3"
region = "us-east-1"
bucket = "terraform-aws-landing-zone"
key = "components"
}
Light Demo:
ALZ Module in Action
Calling Out Contributors:
Thank You!
https://registry.terraform.io/modules/MitocGroup/landing-zone
eistrati euliancom vcalmic You
&

More Related Content

PDF
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
PDF
Commodified IaC using Terraform Cloud
PPTX
Hands-on with the Terraform Module for AWS Landing Zone Indy Cloud Conf 2020
PDF
Integrating Terraform and Consul
PDF
Rover: Implementing Landing Zone Using Docker Container
PDF
Multi-Cloud with Nomad and Consul Connect
PDF
Smart networking with service meshes
PDF
Extending HashiCorp Nomad with Plugins
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
Commodified IaC using Terraform Cloud
Hands-on with the Terraform Module for AWS Landing Zone Indy Cloud Conf 2020
Integrating Terraform and Consul
Rover: Implementing Landing Zone Using Docker Container
Multi-Cloud with Nomad and Consul Connect
Smart networking with service meshes
Extending HashiCorp Nomad with Plugins

What's hot (13)

PPTX
Cloud Native Application Development-build fast, low TCO, scalable & agile so...
PDF
Service Mesh With Consul Connect and Nomad 0.10
PDF
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
PPTX
Impact of cloud services on the work of oracle technology experts
PDF
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
PDF
Our Journey to Infrastructure as Code
PDF
Understanding Migration Paths to Azure webinar 18 oct
PPTX
Azure realtime-interview questions - part 7
PPTX
Hybrid cloud sample architectures
PDF
How to implement data encryption at rest in compliance with enterprise requir...
PDF
Deploying in the Cloud: Why and How
PDF
Informix into the future13 july2017
PPTX
New Roles In The Cloud
Cloud Native Application Development-build fast, low TCO, scalable & agile so...
Service Mesh With Consul Connect and Nomad 0.10
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
Impact of cloud services on the work of oracle technology experts
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
Our Journey to Infrastructure as Code
Understanding Migration Paths to Azure webinar 18 oct
Azure realtime-interview questions - part 7
Hybrid cloud sample architectures
How to implement data encryption at rest in compliance with enterprise requir...
Deploying in the Cloud: Why and How
Informix into the future13 july2017
New Roles In The Cloud
Ad

Similar to Hands-On Terraform Module for AWS Landing Zone at HashiTalks2020 (20)

PDF
Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...
PDF
Terraform AWS modules and some best practices - September 2019
PDF
Terraform AWS modules and some best-practices - May 2019
PDF
Building infrastructure as code using Terraform - DevOps Krakow
PPTX
Terraform Modules and Continuous Deployment
PDF
Terraform modules and some of best-practices - March 2019
PDF
Terraform modules and best-practices - September 2018
PPTX
Terraform Abstractions for Safety and Power
PDF
Terraform modules and (some of) best practices
PPTX
AWS-LZA-CommunityDay_Aotearoa_ppt_v1.pptx
PDF
Terraform at Scale - All Day DevOps 2017
PDF
A Hands-on Introduction on Terraform Best Concepts and Best Practices
PDF
OSDC 2019 | Terraform best practices with examples and arguments by Anton Bab...
PDF
2023-05-24 - Three problems of Terraform DevOps Pro EU.pdf
PPTX
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
PPTX
Hashicorp-Certified-Terraform-Associate-v3-edited.pptx
PDF
Terraform modules and (some of) best practices
PPTX
Terraform - The Road to Self-Service
PDF
Terraform Best Practices - DevOps Unicorns 2019
PDF
Terraform Q&A - HashiCorp User Group Oslo
Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...
Terraform AWS modules and some best practices - September 2019
Terraform AWS modules and some best-practices - May 2019
Building infrastructure as code using Terraform - DevOps Krakow
Terraform Modules and Continuous Deployment
Terraform modules and some of best-practices - March 2019
Terraform modules and best-practices - September 2018
Terraform Abstractions for Safety and Power
Terraform modules and (some of) best practices
AWS-LZA-CommunityDay_Aotearoa_ppt_v1.pptx
Terraform at Scale - All Day DevOps 2017
A Hands-on Introduction on Terraform Best Concepts and Best Practices
OSDC 2019 | Terraform best practices with examples and arguments by Anton Bab...
2023-05-24 - Three problems of Terraform DevOps Pro EU.pdf
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
Hashicorp-Certified-Terraform-Associate-v3-edited.pptx
Terraform modules and (some of) best practices
Terraform - The Road to Self-Service
Terraform Best Practices - DevOps Unicorns 2019
Terraform Q&A - HashiCorp User Group Oslo
Ad

More from Mitoc Group (17)

PPTX
Terraform for Serverless - Best Practices
PDF
The Ultimate Publisher's Need-to-Know Guide to Ad Blockers
PPTX
How Serverless Computing Enables Microservices and Micropayment
PPTX
How Serverless Computing Enables Microservices and Micropayment
PPTX
Serverless Microservices - Real life story of a Web App that uses AngularJS, ...
PPTX
Building Scalable Web Applications using Microservices Architecture and Serve...
PPTX
Building Scalable Web Applications using Microservices Architecture and NodeJ...
PPTX
Serverless Microservices - Real life story of a Web App that uses AWS Lambda
PPTX
Microservices Architecture for Content Management Systems using AWS Lambda an...
PPTX
Microservices Architecture for Web Applications using Serverless Computing wi...
PPTX
Microservices Architecture for Web Applications using AWS Lambda and more
PPTX
Microservices Architecture for Web Applications using Amazon AWS Cloud
PPTX
Microservices Architecture for Content Management Systems using AWS Lambda an...
PPTX
Microservices Architecture for Digital Platforms using Serverless AWS
PPTX
Microservices Architecture for MEAN Applications using Serverless AWS
PPTX
Build Web Applications using Microservices on Node.js and Serverless AWS
PPTX
ARC201 Microservices Architecture @ AWS re:Invent 2015
Terraform for Serverless - Best Practices
The Ultimate Publisher's Need-to-Know Guide to Ad Blockers
How Serverless Computing Enables Microservices and Micropayment
How Serverless Computing Enables Microservices and Micropayment
Serverless Microservices - Real life story of a Web App that uses AngularJS, ...
Building Scalable Web Applications using Microservices Architecture and Serve...
Building Scalable Web Applications using Microservices Architecture and NodeJ...
Serverless Microservices - Real life story of a Web App that uses AWS Lambda
Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Web Applications using Serverless Computing wi...
Microservices Architecture for Web Applications using AWS Lambda and more
Microservices Architecture for Web Applications using Amazon AWS Cloud
Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Digital Platforms using Serverless AWS
Microservices Architecture for MEAN Applications using Serverless AWS
Build Web Applications using Microservices on Node.js and Serverless AWS
ARC201 Microservices Architecture @ AWS re:Invent 2015

Recently uploaded (20)

PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Tartificialntelligence_presentation.pptx
PPTX
1. Introduction to Computer Programming.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
A Presentation on Touch Screen Technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Hybrid model detection and classification of lung cancer
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
A comparative study of natural language inference in Swahili using monolingua...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Zenith AI: Advanced Artificial Intelligence
SOPHOS-XG Firewall Administrator PPT.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Tartificialntelligence_presentation.pptx
1. Introduction to Computer Programming.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
A Presentation on Touch Screen Technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
A novel scalable deep ensemble learning framework for big data classification...
Univ-Connecticut-ChatGPT-Presentaion.pdf
Hybrid model detection and classification of lung cancer
Unlocking AI with Model Context Protocol (MCP)
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
1 - Historical Antecedents, Social Consideration.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
A comparative study of natural language inference in Swahili using monolingua...

Hands-On Terraform Module for AWS Landing Zone at HashiTalks2020

  • 1. Hands-On Terraform Module for AWS Landing Zone registry.terraform.io/modules/MitocGroup/landing-zone
  • 2. 2018: AWS Landing Zone Secure Multi-Accounts Strategy AWS Landing Zone is a solution that helps customers more quickly set up a secure, multi-account AWS environment based on AWS best practices. https://aws.amazon.com/solutions/aws-landing-zone
  • 3. AWS Landing Zone  AWS Control Tower
  • 4. 2019: AWS Control Tower “AWS Landing Zone” as a Service AWS Control Tower provides the easiest way to set up and govern a new, secure, multi-account AWS environment based on best practices established through AWS’ experience working with thousands of enterprises as they move to the cloud. https://aws.amazon.com/controltower
  • 5. AWS Landing Zone  AWS Control Tower
  • 6. Existing Resources Although CloudFormation added recently the ability to import existing resources, current ALZ implementation still doesn’t support an easy and flexible process to reuse existing AWS environments. Customers Feedback (1/3) Below are 3 key issues identified by enterprise customers working hands-on with our professional services organization. AWS Single Sign-On Although AWS SSO is an amazing service, most of our customers would not replace their existing SSO solutions. Current ALZ implementation doesn’t allow switching it with something like Azure AD, Okta or PingIdentity. CloudFormation Enterprise customers who are already using Terraform as their default infrastructure-as- code solution often avoid CloudFormation based implementations, justifying as out of scope.
  • 7. Customers Feedback (2/3) Below are 3 key issues identified by enterprise customers working hands-on with our professional services organization. Existing Resources Although CloudFormation added recently the ability to import existing resources, current ALZ implementation still doesn’t support an easy and flexible process to reuse existing AWS environments. AWS Single Sign-On Although AWS SSO is an amazing service, most of our customers would not replace their existing SSO solutions. Current ALZ implementation doesn’t allow switching it with something like Azure AD, Okta or PingIdentity. CloudFormation Enterprise customers who are already using Terraform as their default infrastructure-as- code solution often avoid CloudFormation based implementations, justifying as out of scope.
  • 8. Existing Resources Although CloudFormation added recently the ability to import existing resources, current ALZ implementation still doesn’t support an easy and flexible process to reuse existing AWS environments. Customers Feedback (3/3) Below are 3 key issues identified by enterprise customers working hands-on with our professional services organization. AWS Single Sign-On Although AWS SSO is an amazing service, most of our customers would not replace their existing SSO solutions. Current ALZ implementation doesn’t allow switching it with something like Azure AD, Okta or PingIdentity. CloudFormation Enterprise customers who are already using Terraform as their default infrastructure-as- code solution often avoid CloudFormation based implementations, justifying as out of scope.
  • 9. About Presenter Eugene ISTRATI @eistrati ▪ CTO, Tech Partner @ Mitoc Group ▪ Ex-AWS, ex-Hearst, ex-GrubHub ▪ Certified AWS Solutions Architect ▪ 20 Years in IT; 10 Years in Cloud Computing; 5 Years in Enterprise IT ▪ Focusing on: Automation, DevOps, Serverless
  • 10. Terraform Module for AWS Landing Zone https://registry.terraform.io/modules/MitocGroup/landing-zone
  • 11. 1. ALZ Module’s Providers 2. ALZ Module’s Components 3. ALZ Module’s TFVARs 4. ALZ Module’s Terraform Backend 5. Light Demo: ALZ Module in Action
  • 14. ▪ Publicly available on TF Registry: https://registry.terraform.io CODE EDITOR module "landing_zone" { source = "MitocGroup/landing-zone/aws" version = "0.2.4" landing_zone_providers = var.landing_zone_providers landing_zone_components = var.landing_zone_components terraform_backend = var.terraform_backend } Landing Zone Module’s Anatomy (1/3)
  • 15. ▪ Publicly available on TF Registry: https://registry.terraform.io ▪ Expected input: list of providers and components CODE EDITOR module "landing_zone" { source = "MitocGroup/landing-zone/aws" version = "0.2.4" landing_zone_providers = var.landing_zone_providers landing_zone_components = var.landing_zone_components terraform_backend = var.terraform_backend } Landing Zone Module’s Anatomy (2/3)
  • 16. ▪ Publicly available on TF Registry: https://registry.terraform.io ▪ Expected input: list of providers and components ▪ Optional input: terraform backend CODE EDITOR module "landing_zone" { source = "MitocGroup/landing-zone/aws" version = "0.2.4" landing_zone_providers = var.landing_zone_providers landing_zone_components = var.landing_zone_components terraform_backend = var.terraform_backend } Landing Zone Module’s Anatomy (3/3)
  • 17. ALZ Module’s Providers 1 Module’s Provider === 1 AWS Account + Region
  • 18. ▪ Required: default provider CODE EDITOR landing_zone_providers = { default = { account_id = "123456789012" region = "us-east-1" }, security_account = { account_id = ”987654321098" region = "us-west-2" } [...] } Landing Zone Module’s Providers (1/5)
  • 19. ▪ Required: default provider – AWS account’s ID – Account’s default region CODE EDITOR landing_zone_providers = { default = { account_id = "123456789012" region = "us-east-1" }, security_account = { account_id = ”987654321098" region = "us-west-2" } [...] } Landing Zone Module’s Providers (2/5)
  • 20. ▪ Required: default provider – AWS account’s ID – Account’s default region ▪ Required: another provider CODE EDITOR landing_zone_providers = { default = { account_id = "123456789012" region = "us-east-1" }, security_account = { account_id = ”987654321098" region = "us-west-2" } [...] } Landing Zone Module’s Providers (3/5)
  • 21. ▪ Required: default provider – AWS account’s ID – Account’s default region ▪ Required: another provider – AWS account’s ID – Account’s default region CODE EDITOR landing_zone_providers = { default = { account_id = "123456789012" region = "us-east-1" }, security_account = { account_id = ”987654321098" region = "us-west-2" } [...] } Landing Zone Module’s Providers (4/5)
  • 22. ▪ Required: default provider – AWS account’s ID – Account’s default region ▪ Required: another provider – AWS account’s ID – Account’s default region ▪ Provider’s key name is used as prefix in landing zone variables CODE EDITOR landing_zone_providers = { default = { account_id = "123456789012" region = "us-east-1" }, security_account = { account_id = ”987654321098" region = "us-west-2" } [...] } Landing Zone Module’s Providers (5/5)
  • 23. ALZ Module’s Components Microservices Architecture + Immutable TF Configurations
  • 24. ▪ Immutable LZ components – shifted focus from TF to TFVAR CODE EDITOR landing_zone_components = { landing_zone_vpc = ”default.tfvars" landing_zone_subnet = ”default.tfvars” […] } Landing Zone Module’s Components (1/3)
  • 25. ▪ Immutable LZ components – shifted focus from TF to TFVAR ▪ Can be local or remote (on S3) CODE EDITOR landing_zone_components = { landing_zone_vpc = "s3://terraform-aws-landing- zone/components/landing_zone_vpc/default.tfvars" landing_zone_subnet = "default.tfvars” […] } Landing Zone Module’s Components (2/3)
  • 26. ▪ Immutable LZ components – shifted focus from TF to TFVAR ▪ Can be local or remote (on S3) ▪ Can be 1 TFVAR or multiple CODE EDITOR landing_zone_components = { landing_zone_vpc = "s3://terraform-aws-landing- zone/components/landing_zone_vpc/default.tfvars" landing_zone_subnet = "s3://terraform-aws-landing- zone/components/landing_zone_subnet/*.tfvars” […] } Landing Zone Module’s Components (3/3)
  • 28. ▪ List providers supported by current component CODE EDITOR landing_zone_providers = ["default"] default_provider = { landing_zone_vpc_resource = { config_0 = { cidr_block = "172.16.0.0/16" instance_tenancy = "default" enable_dns_support = "true" enable_classiclink = "false" enable_dns_hostnames = "false" enable_classiclink_dns_support = "false" } } } Landing Zone Module’s TFVARs (1/5)
  • 29. ▪ List providers supported by current component ▪ Define provider’s values as `[provider_key_name]_provider` CODE EDITOR landing_zone_providers = ["default"] default_provider = { landing_zone_vpc_resource = { config_0 = { cidr_block = "172.16.0.0/16" instance_tenancy = "default" enable_dns_support = "true" enable_classiclink = "false" enable_dns_hostnames = "false" enable_classiclink_dns_support = "false" } } } Landing Zone Module’s TFVARs (2/5)
  • 30. ▪ List providers supported by current component ▪ Define provider’s values as `[provider_key_name]_provider` ▪ Define component’s values as `[component_key_name]_resource` CODE EDITOR landing_zone_providers = ["default"] default_provider = { landing_zone_vpc_resource = { config_0 = { cidr_block = "172.16.0.0/16" instance_tenancy = "default" enable_dns_support = "true" enable_classiclink = "false" enable_dns_hostnames = "false" enable_classiclink_dns_support = "false" } } } Landing Zone Module’s TFVARs (3/5)
  • 31. ▪ List providers supported by current component ▪ Define provider’s values as `[provider_key_name]_provider` ▪ Define component’s values as `[component_key_name]_resource` ▪ Define each resource as iteratable config: `config_0`, `config_1`, etc CODE EDITOR landing_zone_providers = ["default"] default_provider = { landing_zone_vpc_resource = { config_0 = { cidr_block = "172.16.0.0/16" instance_tenancy = "default" enable_dns_support = "true" enable_classiclink = "false" enable_dns_hostnames = "false" enable_classiclink_dns_support = "false" } } } Landing Zone Module’s TFVARs (4/5)
  • 32. ▪ List providers supported by current component ▪ Define provider’s values as `[provider_key_name]_provider` ▪ Define component’s values as `[component_key_name]_resource` ▪ Define each resource as iteratable config: `config_0`, `config_1`, etc ▪ Define resource specific key value pairs CODE EDITOR landing_zone_providers = ["default"] default_provider = { landing_zone_vpc_resource = { config_0 = { cidr_block = "172.16.0.0/16" instance_tenancy = "default" enable_dns_support = "true" enable_classiclink = "false" enable_dns_hostnames = "false" enable_classiclink_dns_support = "false" } } } Landing Zone Module’s TFVARs (5/5)
  • 34. CODE EDITOR terraform_backend = { backend = "local" path = "/tmp/.terrahub/landing_zone" } Landing Zone Module’s Backend (1/2) CODE EDITOR terraform_backend = { backend = "s3" region = "us-east-1" bucket = "terraform-aws-landing-zone" key = "components" }
  • 35. CODE EDITOR terraform_backend = { backend = "local" path = "/tmp/.terrahub/landing_zone" } Landing Zone Module’s Backend (2/2) CODE EDITOR terraform_backend = { backend = "s3" region = "us-east-1" bucket = "terraform-aws-landing-zone" key = "components" }
  • 37. Calling Out Contributors: Thank You! https://registry.terraform.io/modules/MitocGroup/landing-zone eistrati euliancom vcalmic You &