Skip to content

Onboarding a Deployable Architecture to the IBM cloud.

License

Notifications You must be signed in to change notification settings

IBM/da-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

108 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

da-bootstrap

Terraform Infrastructure Agent

An intelligent assistant that guides you through Terraform infrastructure management, from local development to enterprise-wide distribution. This agent helps you choose the right deployment strategy and provides step-by-step guidance for implementing Terraform across four progressive scenarios.

🎯 What This Agent Does

This agent specializes in helping you:

  • Choose the right Terraform deployment approach based on your needs
  • Navigate four progressive scenarios from simple to enterprise-scale
  • Monitor your progress and suggest next steps contextually
  • Migrate between scenarios as your requirements evolve
  • Implement best practices for state file management and team collaboration

πŸ“Š Visual Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    TERRAFORM DEPLOYMENT SCENARIOS                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

    SCENARIO 1              SCENARIO 2              SCENARIO 3              SCENARIO 4
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  πŸ’» LOCAL β”‚          β”‚ ☁️  CLOUD  β”‚          β”‚ πŸ“¦ PRODUCTβ”‚          β”‚ 🌍 GLOBAL β”‚
  β”‚           β”‚   ──>    β”‚           β”‚   ──>    β”‚           β”‚   ──>    β”‚           β”‚
  β”‚  Run on   β”‚          β”‚ Team      β”‚          β”‚ Versioned β”‚          β”‚ Share     β”‚
  β”‚  Computer β”‚          β”‚ Shares    β”‚          β”‚ Releases  β”‚          β”‚ Everyone  β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                      β”‚                      β”‚                      β”‚
       β–Ό                      β–Ό                      β–Ό                      β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ πŸ‘€ Solo β”‚           β”‚πŸ‘₯ Team  β”‚           β”‚πŸ“‹ Multi β”‚           β”‚πŸ’ Org   β”‚
  β”‚ Testing β”‚           β”‚ Collab  β”‚           β”‚ Deploy  β”‚           β”‚ Wide    β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  
  State: Local          State: Cloud          State: Per Deploy     State: Per User
  Risk: ⚠️ High         Risk: βœ… Low          Risk: βœ… Low          Risk: βœ… Low
  Speed: ⚑ Fast        Speed: 🐒 Slower      Speed: 🐒 Slower      Speed: 🐒 Slower
  Setup: βœ… Easy        Setup: πŸ“‹ Medium      Setup: πŸ“‹ Complex     Setup: πŸ“‹ Complex

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ EVOLUTION PATH: Start anywhere, but Scenario 4 requires Scenario 3 first    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ The Four Scenarios

Scenario 1: Run on My Computer (Local Development)

What it means: Run Terraform directly on your laptop/desktop

Best for:

  • Quick experiments and testing
  • Learning Terraform
  • Solo projects
  • Short-term resources (< 1 week)

Key characteristics:

  • βœ… Fast iteration and immediate feedback
  • βœ… Zero setup complexity
  • ⚠️ State file stored locally (risk of loss)
  • ⚠️ Only you can manage the resources

Scenario 2: Run on Cloud - Team Shares (IBM Schematics)

What it means: Team collaborates on the SAME infrastructure using cloud-based Terraform

Best for:

  • Team collaboration
  • Long-term resources (> 1 month)
  • Production environments
  • Shared infrastructure management

Key characteristics:

  • βœ… Cloud-backed state file (protected)
  • βœ… Multiple team members can manage together
  • βœ… Disaster recovery built-in
  • πŸ“‹ Requires Git repository setup

Scenario 3: Create Versions - Everyone Gets Separate Infrastructure (Product Offerings)

What it means: Create versioned releases (v1.0, v2.0) where each deployment creates NEW, independent infrastructure

Best for:

  • Reusable templates
  • Multiple teams needing separate environments
  • Version tracking and rollback capability
  • Different deployment instances

Key characteristics:

  • βœ… Formal version releases (v1.0.0, v2.0.0)
  • βœ… Each deployment = new workspace + new resources
  • βœ… Independent lifecycle per instance
  • πŸ“‹ Must have Scenario 2 foundation (Git + releases)

Scenario 4: Share with Everyone (Global Distribution)

What it means: Publish your template organization-wide for company-wide self-service

Best for:

  • Mature, proven templates
  • Organization-wide standards
  • Reducing duplicate work
  • Self-service infrastructure

Key characteristics:

  • βœ… Available to entire organization
  • βœ… Centralized support and maintenance
  • βœ… Standardized infrastructure patterns
  • πŸ“‹ Requires Scenario 3 first (must have product offering)

πŸ—ΊοΈ Your Journey Path

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ SCENARIO 1  β”‚ ──>β”‚ SCENARIO 2  β”‚ ──>β”‚ SCENARIO 3  β”‚ ──>β”‚ SCENARIO 4  β”‚
β”‚   START     β”‚    β”‚    GROW     β”‚    β”‚    SCALE    β”‚    β”‚    SHARE    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  Run on My          Run on Cloud      Create Versions    Share with
  Computer           (Team Shares)     (Separate Infra)   Everyone

Important: Each scenario builds on the previous one. You can start anywhere, but Scenario 4 requires Scenario 3 to be completed first.

🧭 Quick Decision Guide

Start Here: Which Scenario Am I?

βœ“ Check Your Situation β†’ Your Scenario
Just testing quickly Scenario 1
Solo work, short-term Scenario 1
Team collaboration needed Scenario 2
Resources exist long-term (>few weeks) Scenario 2
Need version tracking (v1.0, v2.0) Scenario 3
Multiple teams need separate copies Scenario 3
Template useful company-wide Scenario 4

πŸ“š Agent Skills

The agent uses five specialized skills to guide you:

  1. terraform-deployment-decision-guide.md - Decision framework for choosing between scenarios
  2. local-terraform-management.md - Manage Terraform locally (Scenario 1)
  3. cloud-schematics-terraform.md - Deploy with IBM Schematics for team collaboration (Scenario 2)
  4. terraform-product-offerings.md - Create versioned product offerings (Scenario 3)
  5. global-terraform-sharing.md - Share templates organization-wide (Scenario 4)

πŸŽ“ How the Agent Helps You

1. Initial Assessment

The agent examines your workspace to understand:

  • Current Terraform setup
  • Existing files and repositories
  • Team collaboration needs
  • Resource lifecycle requirements

2. Scenario Recommendation

Based on your situation, the agent recommends:

  • Which scenario fits your needs
  • Why that scenario is appropriate
  • What you need to implement it
  • Potential migration paths

3. Progress Monitoring

The agent actively tracks:

  • βœ… Scenario 1: Local Terraform files, state file existence
  • βœ… Scenario 2: Git repository, Schematics workspace setup
  • βœ… Scenario 3: Git releases, product offering creation
  • βœ… Scenario 4: Global publishing, documentation completeness

4. Contextual Guidance

The agent provides next-step recommendations like:

  • "You have local Terraform running. Ready to enable team collaboration? Let's migrate to Scenario 2."
  • "Your Schematics workspace is set up. Consider creating formal releases (Scenario 3) for version control."
  • "Your product offering is mature. Time to share it organization-wide (Scenario 4)?"

5. Migration Detection

The agent recognizes when you're ready to evolve:

  • 1 β†’ 2: Multiple team members need access, or resources becoming long-term
  • 2 β†’ 3: Need for version tracking, multiple deployments required
  • 3 β†’ 4: Template proven valuable, ready for organization-wide adoption

πŸ”‘ Key Concepts

State File Management

The state file is Terraform's critical map to your actual cloud resources. It tracks what exists and enables proper updates. Different scenarios handle state files differently:

  • Scenario 1: Stored on your local machine (vulnerable to loss)
  • Scenario 2: Stored in IBM Cloud (protected, shared)
  • Scenario 3: Separate state file per deployment instance
  • Scenario 4: Separate state file per user deployment

Shared vs. Separate Infrastructure

Shared Infrastructure (Scenario 2):

  • One workspace = One set of resources
  • Team works together on same servers/databases
  • Updates affect everyone

Separate Infrastructure (Scenarios 3 & 4):

  • Each deployment = New workspace + New resources
  • Everyone gets their own servers/databases
  • Updates don't affect other instances

πŸ› οΈ Getting Started

Prerequisites

  • IBM Cloud account (for Scenarios 2-4)
  • Git repository (for Scenarios 2-4)
  • Terraform installed locally (for Scenario 1)
  • Basic understanding of infrastructure as code

Typical Workflow

  1. Start with the agent: Describe your situation
  2. Get recommendation: Agent suggests appropriate scenario
  3. Follow guidance: Agent provides step-by-step instructions
  4. Monitor progress: Agent tracks your implementation
  5. Evolve as needed: Agent suggests when to upgrade scenarios

πŸ“Š Decision Criteria

The agent evaluates multiple factors:

Factor Weight Considerations
Team Size High Single user vs. collaborative team
Resource Lifetime Critical Hours vs. weeks vs. months
Environment Type High Development vs. production
Collaboration Need Critical Solo vs. team vs. organization
Risk Tolerance High State file protection requirements
Compliance Critical Regulatory and audit requirements

🎯 Use Cases

Solo Developer Testing New Module

  • Scenario: 1 (Local)
  • Why: Quick iteration, disposable resources, no collaboration needed

Team Building Shared VPC

  • Scenario: 2 (Cloud - Team Shares)
  • Why: Team collaboration essential, long-term resources, production-bound

Reusable Database Template

  • Scenario: 3 (Product Offering)
  • Why: Multiple teams need separate database instances, version tracking required

Standard Kubernetes Cluster Pattern

  • Scenario: 4 (Global Sharing)
  • Why: Proven template, useful company-wide, reduces duplication

⚠️ Common Mistakes to Avoid

  1. Using Local for Production - State file loss causes outages
  2. Using Cloud for Quick Tests - Overhead slows development
  3. No Migration Plan - Stuck with local when team grows
  4. Ignoring State File Backups - Lost state = unmanaged resources
  5. Mixing Local and Cloud - State conflicts and resource drift

πŸ”„ Migration Strategies

From Local to Cloud

  1. Fresh Start (Recommended): Deploy new resources in cloud
  2. State Import: Import existing state file to Schematics
  3. Parallel Management: Run both temporarily, then migrate

From Cloud to Product Offering

  1. Create Git releases with semantic versioning
  2. Import releases to cloud catalog
  3. Share with authorized teams

From Product Offering to Global

  1. Complete quality and security reviews
  2. Enhance documentation
  3. Establish support structure
  4. Publish to enterprise catalog

πŸ“– Documentation Structure

β”œβ”€β”€ README.md (this file)
β”œβ”€β”€ agent.md (agent configuration)
β”œβ”€β”€ terraform-deployment-decision-guide.md (decision framework)
β”œβ”€β”€ local-terraform-management.md (Scenario 1)
β”œβ”€β”€ cloud-schematics-terraform.md (Scenario 2)
β”œβ”€β”€ terraform-product-offerings.md (Scenario 3)
β”œβ”€β”€ global-terraform-sharing.md (Scenario 4)
└── notes/
    └── terraform-scenarios.txt (operational notes)

🀝 How to Interact with the Agent

Example Interactions

"I'm testing a new Terraform module quickly" β†’ Agent recommends Scenario 1, provides local setup guidance

"My team needs to manage production infrastructure together" β†’ Agent recommends Scenario 2, guides Schematics setup

"We want to create reusable templates with version control" β†’ Agent recommends Scenario 3, helps create product offerings

"Our template is mature and should be available company-wide" β†’ Agent recommends Scenario 4, guides global publishing

Questions the Agent Asks

  1. How long will these resources exist?
  2. Who needs to manage them?
  3. What's the risk if state file is lost?
  4. Are there compliance requirements?
  5. Is this development or production?
  6. How often will changes occur?
  7. What's the team size?

πŸŽ“ Learning Path

Beginner

  1. Start with Scenario 1 (Local)
  2. Learn Terraform basics
  3. Understand state file importance
  4. Practice with disposable resources

Intermediate

  1. Move to Scenario 2 (Cloud)
  2. Set up Git repository
  3. Create Schematics workspace
  4. Collaborate with team

Advanced

  1. Implement Scenario 3 (Product Offerings)
  2. Create versioned releases
  3. Distribute to multiple teams
  4. Manage multiple instances

Expert

  1. Achieve Scenario 4 (Global Sharing)
  2. Publish organization-wide
  3. Establish support structure
  4. Drive infrastructure standards

πŸ”’ Security Considerations

  • State files may contain sensitive data
  • Never commit state files to version control
  • Use IAM for access control
  • Encrypt state file storage
  • Rotate credentials regularly
  • Implement audit logging

πŸ’° Cost Considerations

  • Scenario 1: Pay only for created resources
  • Scenario 2: Schematics workspace is free, pay for resources
  • Scenario 3: Catalog management free, pay per deployment
  • Scenario 4: Same as Scenario 3, but more deployments

πŸ“ž Getting Help

The agent provides contextual help based on:

  • Your current scenario
  • Progress made so far
  • Blockers encountered
  • Next logical steps

Simply describe your situation, and the agent will guide you through the appropriate scenario.

🌟 Golden Rules

  1. Local for speed, Cloud for safety
  2. Single user = Local, Team = Cloud
  3. Short-term = Local, Long-term = Cloud
  4. Development = Flexible, Production = Cloud
  5. When in doubt, choose Cloud

πŸ“ Summary

This agent transforms Terraform infrastructure management from a complex decision into a guided journey. Whether you're a solo developer testing locally or an enterprise architect publishing global standards, the agent provides the right guidance at the right time.

Start simple, evolve as needed, and let the agent guide you through each step of your infrastructure journey.


Ready to get started? Tell the agent about your Terraform needs, and it will recommend the best path forward!

About

Onboarding a Deployable Architecture to the IBM cloud.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages