This repository contains all Terraform configuration files used to create Binbash Leverage Reference AWS Cloud Solutions Architecture.
Check out the Binbash Leverage Reference Architecture Official Documentation.
In order to get the full automated potential of the
Binbash Leverage DevOps Automation Code Library
you should follow the steps below:
-
Install and use the
leverage cli -
Update your configuration files
-
Review and assure you meet all the Terraform AWS pre-requisites
- AWS Credentials (Including your MFA setup)
- Run
leverage aws sso loginto setup the credentials.
- Run
- Initialize your accounts Terraform State Backend
- AWS Credentials (Including your MFA setup)
-
Follow the standard
leverage cliworkflow- Get into the folder that you need to work with (e.g.
/security/global/base-identities) - Run
leverage tf init - Make whatever changes you need to make
- Run
leverage tf plan(if you only mean to preview those changes) - Run
leverage tf apply(if you want to review and likely apply those changes) - Repeat for any desired Reference Architecture layer
- Get into the folder that you need to work with (e.g.
The backend.tfvars will inject the profile name with the necessary permissions that Terraform will
use to make changes on AWS.
- Such profile is usually one that relies on another profile to assume a role to get access to each corresponding account ( AWS IAM: users, groups, roles & policies )
- Read the following AWS page doc to understand how to set up a profile to assume a role
This repository includes pre-configured settings for AI-powered development tools to enhance productivity and maintain consistency across the codebase.
-
Cursor IDE - AI-first code editor with project-specific rules
.cursor/rules/- Markdown rules for OpenTofu/Terraform best practices.cursor/mcp.json- MCP server configurations for AWS and Terraform documentation
-
Kiro IDE - AI development environment with steering documents
.kiro/steering/- Comprehensive documentation about the project structure, tech stack, and best practices.kiro/settings/mcp.json- MCP configurations for enhanced AWS/Terraform support
-
Claude Code - Anthropic's AI coding assistant
These configurations are automatically loaded when you open the project in the respective IDE/tool. They provide:
- Context-aware code suggestions aligned with Leverage best practices
- AWS and Terraform/OpenTofu specific assistance
- Consistent code formatting and structure guidelines
- Direct access to AWS documentation and Terraform registry
╭─ ~/ref-architecture/le-tf-infra-aws on master · ✔ at 12:13:36
╰─ leverage
Usage: leverage [OPTIONS] COMMAND [ARGS]...
Leverage Reference Architecture projects command-line tool.
Options:
-f, --filename TEXT Name of the build file containing the tasks
definitions. [default: build.py]
-l, --list-tasks List available tasks to run.
-v, --verbose Increase output verbosity.
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
credentials Manage AWS cli credentials.
project Manage a Leverage project.
run Perform specified task(s) and all of its dependencies.
terraform Run Terraform commands in a custom containerized...
tf Run Terraform commands in a custom containerized...╭─ ~/ref-architecture/le-tf-infra-aws on master · ✔ at 12:13:36
╰─ leverage tf
Usage: leverage tf [OPTIONS] COMMAND [ARGS]...
Run Terraform commands in a custom containerized environment that provides
extra functionality when interacting with your cloud provider such as
handling multi factor authentication for you. All terraform subcommands that
receive extra args will pass the given strings as is to their corresponding
Terraform counterparts in the container. For example as in `leverage
terraform apply -auto-approve` or `leverage tf init -reconfigure`
Options:
-h, --help Show this message and exit.
Commands:
apply Build or change the infrastructure in this layer.
aws Run a command in AWS cli.
destroy Destroy infrastructure in this layer.
format Check if all files meet the canonical format and rewrite them...
import Import a resource.
init Initialize this layer.
output Show all output variables of this layer.
plan Generate an execution plan for this layer.
shell Open a shell into the Terraform container in this layer.
validate Validate code of the current directory.
version Print version.