Skip to content

LeTuR/terraform-lz-bootstrap

Repository files navigation

Landing Zone Bootstrap

This repository is meant to bootstrap infrastructure repository with terraform CI/CD and Azure Subscription. Goal is to simplify and speed up deployment using best practices.

Support Status

Version Control Support
GitHub Yes
Azure DevOps Plan
Gitlab No
Self-hosted Runner Support
GitHub Plan
Azure DevOps Plan
Gitlab No

Getting Started

Configure landing_zone.auto.tfvars:



Update `landing_zone.auto.tfvars` file, and run:

```sh
terraform init
terraform apply

Requirements

Name Version
terraform ~>1.10
azurerm ~>4.18
github ~> 5.36
random ~> 3.6

Providers

Name Version
azurerm ~>4.18
random ~> 3.6

Modules

Name Source Version
azure ./modules/azure n/a
github ./modules/github n/a
resource_names ./modules/resource_names n/a

Resources

Name Type
random_string.this resource
azurerm_client_config.current data source

Inputs

Name Description Type Default Required
enable_telemetry Enable telemetry. bool true no
environment_name The name of the environment. string n/a yes
github_approvers The list of GitHub users or teams that can approve the apply workflow. list(string) n/a yes
github_organization_name The name of your GitHub organization. This is the section of the url after 'github.com'. E.g. enter 'my-org' for 'https://github.com/my-org' string n/a yes
github_personal_access_token The personal access token for GitHub. string n/a yes
github_private_repository Set GitHub private repository. When using a free plan, public repositories are required to get all the deployment features such as deployment protection rules and environments. bool true no
github_repository_exists Set to true if the repository already exists. bool false no
github_require_signed_commits Enforce signed commits for security bool true no
github_root_module_folder_relative_path Set root module folder string "." no
landing_zone_subscription_id The subscription id of the landing zone. string "" no
location The location/region where the resources will be created. string n/a yes
postfix_number Used to build up the default resource names (e.g. rg-terraform-dev-francecentral-<postfix_number>) number 1 no
resource_names Override the default names for resources. map(string)
{
"identity_apply_name": "id-{{service_name}}-{{environment_name}}-apply-{{azure_location}}-{{postfix_number}}",
"identity_plan_name": "id-{{service_name}}-{{environment_name}}-plan-{{azure_location}}-{{postfix_number}}",
"resource_group_identity_name": "rg-{{service_name}}-{{environment_name}}-identity-{{azure_location}}-{{postfix_number}}",
"resource_group_state_name": "rg-{{service_name}}-{{environment_name}}-state-{{azure_location}}-{{postfix_number}}",
"storage_account_state_name": "sto{{service_name}}{{environment_name}}state{{azure_location_short}}{{postfix_number}}{{random_string}}",
"user_assigned_managed_identity_federated_credentials_prefix": "{{service_name}}-{{environment_name}}-{{azure_location}}-{{postfix_number}}",
"version_control_system_environment_apply": "{{service_name}}-{{environment_name}}-apply",
"version_control_system_environment_plan": "{{service_name}}-{{environment_name}}-plan",
"version_control_system_repository_infra": "{{service_name}}-infra",
"version_control_system_repository_templates": "{{service_name}}-{{environment_name}}-templates",
"version_control_system_team": "{{service_name}}-{{environment_name}}-approvers"
}
no
service_name The name of the landing zone service. string n/a yes

Outputs

No outputs.

About

Create a landing zone bootstrap.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages