Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement | Create symlinked common-variables.tf file (ISSUE-31) #40

Merged
merged 8 commits into from
Apr 5, 2024
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<a href="https://github.com/binbashar">
<img src="https://raw.githubusercontent.com/binbashar/le-ref-architecture-doc/master/docs/assets/images/logos/binbash-leverage-banner.png" width="1032" align="left" alt="Binbash"/>
</a>
<br clear="left"/>

# Leverage Terraform Infrastructure Template (le-tf-infra-aws-template)

## Overview
This repository contains the Terraform configuration template files used by Leverage CLI during proyect creation.


## Documentation
For more information check out the [Binbash Leverage Official Documentation](https://leverage.binbash.co/concepts/.

---
149 changes: 149 additions & 0 deletions template/config/common-variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
#================================#
# Common variables #
#================================#

#
# config/backend.config
#
#================================#
# Terraform AWS Backend Settings #
#================================#
variable "region" {
type = string
description = "AWS Region"
}

variable "region_primary" {
type = string
description = "AWS Region"
}

variable "profile" {
type = string
description = "AWS Profile (required by the backend but also used for other resources)"
}

variable "bucket" {
type = string
description = "AWS S3 TF State Backend Bucket"
}

variable "dynamodb_table" {
type = string
description = "AWS DynamoDB TF Lock state table name"
}

variable "encrypt" {
type = bool
description = "Enable AWS DynamoDB with server side encryption"
}


#=============================#
# Project Variables #
#=============================#
variable "project" {
type = string
description = "Project Name"
}

variable "project_long" {
type = string
description = "Project Long Name"
}

variable "environment" {
type = string
description = "Environment Name"
}


#=============================#
# Accounts & Extra Vars #
#=============================#
variable "region_secondary" {
type = string
description = "AWS Secondary Region for HA"
}

variable "accounts" {
type = map(any)
description = "Accounts descriptions"
}

variable "vault_address" {
type = string
description = "Vault Address"
}

variable "vault_token" {
type = string
description = "Vault Token"
}

diego-ojeda-binbash marked this conversation as resolved.
Show resolved Hide resolved
variable "management_account_id" {
type = string
description = "Account: Management"
}

variable "security_account_id" {
type = string
description = "Account: Security & Users Management"
}

variable "shared_account_id" {
type = string
description = "Account: Shared Resources"
}

#=============================#
# AWS SSO Variables #
#=============================#
variable "sso_role" {
description = "SSO Role Name"
}

variable "sso_enabled" {
type = string
description = "Enable SSO Service"
}

variable "sso_region" {
type = string
description = "SSO Region"
}

variable "sso_start_url" {
type = string
description = "SSO Start Url"
}

#===========================================#
# Networking #
#===========================================#
variable "enable_tgw" {
description = "Enable Transit Gateway Support"
type = bool
default = false
}

variable "enable_tgw_multi_region" {
description = "Enable Transit Gateway multi region support"
type = bool
default = false
}

variable "tgw_cidrs" {
description = "CIDRs to be added as routes to public RT"
type = list(string)
default = []
}

#===========================================#
# Security compliance
#===========================================#
variable "enable_inspector" {
description = "Turn inspector on/off"
type = bool
default = false
}
70 changes: 1 addition & 69 deletions template/management/global/organizations/variables.tf
Original file line number Diff line number Diff line change
@@ -1,71 +1,3 @@
#
# management/config/backend.tfvars
#
#================================#
# Terraform AWS Backend Settings #
# Local variables #
#================================#
variable "region" {
type = string
description = "AWS Region"
}

variable "profile" {
type = string
description = "AWS Profile (required by the backend but also used for other resources)"
}

variable "bucket" {
type = string
description = "AWS S3 TF State Backend Bucket"
}

variable "dynamodb_table" {
type = string
description = "AWS DynamoDB TF Lock state table name"
}

variable "encrypt" {
type = bool
description = "Enable AWS DynamoDB with server side encryption"
}

#
# config/common.tfvars
#
#=============================#
# Project Variables #
#=============================#
variable "project" {
type = string
description = "Project Name"
}

variable "project_long" {
type = string
description = "Project Long Name"
}

variable "environment" {
type = string
description = "Environment Name"
}

variable "region_secondary" {
type = string
description = "AWS Secondary Region for HA"
}

variable "management_account_id" {
type = string
description = "Account: Management"
}

variable "security_account_id" {
type = string
description = "Account: Security & Users Management"
}

variable "shared_account_id" {
type = string
description = "Account: Shared Resources"
}
1 change: 1 addition & 0 deletions template/management/global/sso/common-variables.tf
75 changes: 1 addition & 74 deletions template/management/global/sso/variables.tf
Original file line number Diff line number Diff line change
@@ -1,76 +1,3 @@
#
# management/backend.tfvars
#
#================================#
# Terraform AWS Backend Settings #
# Local variables #
#================================#
variable "region" {
type = string
description = "AWS Region"
}

variable "profile" {
type = string
description = "AWS Profile (required by the backend but also used for other resources)"
}

variable "bucket" {
type = string
description = "AWS S3 TF State Backend Bucket"
}

variable "dynamodb_table" {
type = string
description = "AWS DynamoDB TF Lock state table name"
}

variable "encrypt" {
type = bool
description = "Enable AWS DynamoDB with server side encryption"
}

#
# config/common.tfvars
#
#=============================#
# Project Variables #
#=============================#
variable "project" {
type = string
description = "Project Name"
}

variable "project_long" {
type = string
description = "Project Long Name"
}

variable "environment" {
type = string
description = "Environment Name"
}

variable "region_secondary" {
type = string
description = "AWS Secondary Region for HA"
}

variable "management_account_id" {
type = string
description = "Account: Management"
}

variable "security_account_id" {
type = string
description = "Account: Security & Users Management"
}

variable "shared_account_id" {
type = string
description = "Account: Shared Resources"
}

variable "accounts" {
type = map(any)
description = "Accounts descriptions"
}
Original file line number Diff line number Diff line change
@@ -1,71 +1,3 @@
#
# management/config/backend.tfvars
#
#================================#
# Terraform AWS Backend Settings #
# Local variables #
#================================#
variable "region" {
type = string
description = "AWS Region"
}

variable "profile" {
type = string
description = "AWS Profile (required by the backend but also used for other resources)"
}

variable "bucket" {
type = string
description = "AWS S3 TF State Backend Bucket"
}

variable "dynamodb_table" {
type = string
description = "AWS DynamoDB TF Lock state table name"
}

variable "encrypt" {
type = bool
description = "Enable AWS DynamoDB with server side encryption"
}

#
# config/common.tfvars
#
#=============================#
# Project Variables #
#=============================#
variable "project" {
type = string
description = "Project Name"
}

variable "project_long" {
type = string
description = "Project Long Name"
}

variable "environment" {
type = string
description = "Environment Name"
}

variable "region_secondary" {
type = string
description = "AWS Secondary Region for HA"
}

variable "management_account_id" {
type = string
description = "Account: Management"
}

variable "security_account_id" {
type = string
description = "Account: Security & Users Management"
}

variable "shared_account_id" {
type = string
description = "Account: Shared Resources"
}
Loading
Loading