{"id":31105992,"url":"https://github.com/bright/cdktf-training","last_synced_at":"2025-09-17T04:52:05.239Z","repository":{"id":286531559,"uuid":"951869372","full_name":"bright/cdktf-training","owner":"bright","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-20T11:27:13.000Z","size":9578,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T02:38:15.252Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-20T11:22:32.000Z","updated_at":"2025-03-20T11:27:51.000Z","dependencies_parsed_at":"2025-04-07T02:38:44.917Z","dependency_job_id":"bab92f29-2bb0-47c5-b844-e9fdf1fe729d","html_url":"https://github.com/bright/cdktf-training","commit_stats":null,"previous_names":["bright/cdktf-training"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bright/cdktf-training","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bright%2Fcdktf-training","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bright%2Fcdktf-training/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bright%2Fcdktf-training/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bright%2Fcdktf-training/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bright","download_url":"https://codeload.github.com/bright/cdktf-training/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bright%2Fcdktf-training/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275537148,"owners_count":25482345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-17T04:52:01.536Z","updated_at":"2025-09-17T04:52:05.230Z","avatar_url":"https://github.com/bright.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Infrastructure as Code Workshop with Terraform and CDKTF\n\nThis repository contains a workshop for learning Infrastructure as Code (IaC) using Terraform and the Cloud Development Kit for Terraform (CDKTF) to manage Google Cloud Platform (GCP) resources.\n\n## Workshop Overview\n\nThis workshop guides you through a progressive learning journey:\n\n1. **Step 1**: Basic Terraform with HCL (HashiCorp Configuration Language)\n2. **Step 2**: CDKTF with TypeScript\n3. **Step 3**: Advanced CDKTF with environment variables and remote state management\n\nEach step builds on the previous one, demonstrating how to create the same infrastructure (GCP Pub/Sub topics and schemas) using different approaches and increasing levels of sophistication.\n\n## Prerequisites\n\n- [Terraform](https://www.terraform.io/downloads.html) (v1.0.0+)\n- [Node.js](https://nodejs.org/) (v14.0+)\n- [CDKTF CLI](https://learn.hashicorp.com/tutorials/terraform/cdktf-install)\n- [Google Cloud SDK](https://cloud.google.com/sdk/docs/install)\n- A Google Cloud Platform account with a project\n- Appropriate permissions to create Pub/Sub resources and Storage Buckets\n\n## Workshop Structure\n\n### Step 1: Simple Terraform Example\n\nLocated in the `step1` directory, this step introduces basic Terraform concepts using HCL to define:\n- A GCP Pub/Sub topic\n- A GCP Pub/Sub schema\n- A GCP Pub/Sub topic with the schema attached\n\nThis step focuses on understanding the basic structure of Terraform configurations, including providers, resources, variables, and outputs.\n\n### Step 2: CDKTF Example\n\nLocated in the `step2` directory, this step introduces CDKTF with TypeScript to define the same infrastructure as in Step 1. Key concepts include:\n- Using a programming language (TypeScript) instead of HCL\n- Defining infrastructure as code using object-oriented programming\n- Understanding CDKTF constructs and how they map to Terraform resources\n\n### Step 3: Advanced CDKTF with Environment Variables and Remote State\n\nLocated in the `step3` directory, this step enhances the CDKTF project with:\n- Environment-specific deployments (stage/prod)\n- Resource naming with environment prefixes\n- Remote state management using a GCP Storage Bucket\n\nThis step demonstrates how to build more sophisticated infrastructure deployments with proper environment separation and state management.\n\n## Getting Started\n\n1. Clone this repository\n2. Follow the instructions in each step's README.md file, starting with Step 1\n\n## Workshop Flow\n\nFor the best learning experience, follow these steps:\n\n1. Start with Step 1 to understand basic Terraform concepts\n2. Move to Step 2 to learn how to use CDKTF with TypeScript\n3. Complete Step 3 to understand advanced concepts like environment variables and remote state\n\nEach step includes detailed instructions in its own README.md file.\n\n## Presentation Slide Deck\n\nThis repository includes a presentation slide deck (`presentation/cdktf-presentation.md`) created with Marp that provides an overview of Infrastructure as Code, Terraform, and CDKTF concepts.\n\n### Generating Simple Images for Slides\n\nThe repository includes a script for generating simple, clean images with a single focused item, specifically designed for presentation slides using OpenAI's DALL-E:\n\n```bash\n# Generate a simple image with a single focused item for a presentation slide\nnode scripts/generate-image.js -p \"Your image description\" -o \"presentation/images/output.png\" --style minimal\n\n# Generate a flat-style image with a single focused item\nnode scripts/generate-image.js -p \"Your image description\" -o \"presentation/images/output.png\" --style flat\n```\n\nSee the [Image Generation Script README](scripts/README.md) for more details and options.\n\n### Presenting the Slides\n\nThere are several ways to present the Marp slide deck:\n\n#### Using Marp CLI\n\n1. You can use Marp CLI with npx without installing it globally:\n   ```bash\n   npx @marp-team/marp-cli\n   ```\n\n2. Convert the presentation to HTML (for viewing in a browser):\n   ```bash\n   npx @marp-team/marp-cli presentation/cdktf-presentation.md --output presentation.html\n   ```\n\n3. Convert to PDF:\n   ```bash\n   npx @marp-team/marp-cli presentation/cdktf-presentation.md --pdf\n   ```\n\n4. Convert to PowerPoint:\n   ```bash\n   npx @marp-team/marp-cli presentation/cdktf-presentation.md --pptx\n   ```\n\n5. Start a live server for presenting (with hot reload):\n   ```bash\n   npx @marp-team/marp-cli -s presentation/cdktf-presentation.md\n   ```\n\n#### Using VS Code with Marp Extension\n\n1. Install the [Marp for VS Code](https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode) extension\n2. Open `presentation/cdktf-presentation.md` in VS Code\n3. Use the \"Marp: Export slide deck...\" command from the command palette (Ctrl+Shift+P or Cmd+Shift+P)\n4. Choose your preferred export format (HTML, PDF, PPTX)\n5. For presentation mode, click the \"Open Preview to the Side\" button or use the \"Marp: Open preview\" command\n\n#### Presentation Tips\n\n- Use the arrow keys to navigate between slides\n- Press `f` to enter fullscreen mode when presenting from HTML\n- Press `p` to toggle presenter notes view (if presenter notes are included)\n\n## Resources\n\n- [Terraform Documentation](https://www.terraform.io/docs/index.html)\n- [CDKTF Documentation](https://learn.hashicorp.com/terraform/cdktf/cdktf-intro)\n- [Google Cloud Pub/Sub Documentation](https://cloud.google.com/pubsub/docs)\n- [TypeScript Documentation](https://www.typescriptlang.org/docs/)\n- [Marp Documentation](https://marpit.marp.app/)\n- [Marp CLI Documentation](https://github.com/marp-team/marp-cli)\n\n## Notes\n\n- This workshop is designed for educational purposes\n- The examples are simplified to focus on learning concepts\n- In a production environment, you would likely add more security features and follow best practices for secret management\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbright%2Fcdktf-training","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbright%2Fcdktf-training","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbright%2Fcdktf-training/lists"}