A modern web application that enables users to generate Terraform state files for cloud infrastructure across AWS, GCP, and Azure.
This application helps users generate Terraform state files for their cloud infrastructure by selecting:
- Cloud provider (AWS, GCP, Azure)
- Regions
- Resource types
- Number of resources to generate
- Whether to include connections between resources
The generated state file can be viewed in the browser and downloaded as a terraform.tfstate file.
- Interactive cloud provider selection
- Region selection for each provider
- Resource type filtering and selection
- Configurable resource generation count
- Option to include resource connections
- Instant preview of generated state file
- Download functionality for state files
- Next.js 15 - React framework with app router
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS - Styling
- Headless UI & Radix UI - UI components
- Node.js 18.17 or later
- npm, yarn, pnpm, or bun
-
Clone the repository:
git clone https://github.com/yourusername/statefile-generator.git cd statefile-generator -
Install dependencies:
npm install # or yarn install # or pnpm install # or bun install
Run the development server with:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devThe application uses Turbopack for faster development builds. Open http://localhost:3000 in your browser to see the application.
Build the application for production:
npm run build
# or
yarn build
# or
pnpm build
# or
bun buildStart the production server:
npm run start
# or
yarn start
# or
pnpm start
# or
bun startRun linting:
npm run lint
# or
yarn lint
# or
pnpm lint
# or
bun lintstatefile-generator/
├── public/ # Static assets
├── src/
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ ├── data/ # Static data files
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Core application logic
│ │ ├── providers/ # Cloud provider implementations
│ │ ├── resource-handlers/ # Resource type handlers
│ │ └── utils/ # Utility functions
│ ├── styles/ # Global styles
│ └── types/ # TypeScript type definitions
└── ...
- Select a cloud provider (AWS, GCP, or Azure)
- Choose one or more regions
- Specify whether to include connections between resources
- Select the resource types you want to generate
- Set the total number of resources to generate
- Click "Generate State File" to create the Terraform state
- Preview the generated state file in the application
- Click "Download" to save the state file to your computer
Contributions are welcome! Please feel free to submit a Pull Request.