Production-ready Terraform modules for Fabric and Besu, plus a GitHub Actions pipeline that deploys blockchain nodes with one git push.
Manual node provisioning creates configuration drift, undocumented setups, and deployments that only one person knows how to reproduce. When that person is unavailable during an incident, you're stuck. Infrastructure as Code eliminates this entirely.
# main.tf — Fabric Network (using chainlaunch provider)
resource "chainlaunch_key" "org1_key" {
name = "org1-signing-key"
algorithm = "ECDSA"
curve = "P-256"
provider_id = chainlaunch_key_provider.database.id
}
resource "chainlaunch_fabric_organization" "org1" {
name = "Org1"
msp_id = "Org1MSP"
description = "Supply chain manufacturer"
provider_id = chainlaunch_key_provider.database.id
}
resource "chainlaunch_fabric_peer" "peer0_org1" {
name = "peer0-org1"
organization_id = chainlaunch_fabric_organization.org1.id
listen_address = "0.0.0.0:7051"
chaincode_address = "0.0.0.0:7052"
events_address = "0.0.0.0:7053"
operations_port = 9443
domain_names = ["peer0.org1.example.com"]
}# .github/workflows/deploy.yml
name: Blockchain Infrastructure
on:
pull_request:
paths: ['environments/**']
push:
branches: [main]
paths: ['environments/**']
jobs:
plan:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- run: terraform init
- run: terraform plan -no-color
# Posts plan as PR comment...Enter your work email and we'll send you the complete Terraform modules, CI/CD pipeline, and state management config.