Skip to content

refactor(terraform): revamp GenAI & ML infrastructure to lightweight application-level IaC - #223

Merged
iht merged 2 commits into
GoogleCloudPlatform:mainfrom
iht:feat/revamp-ml-ai-terraform
Aug 23, 2026
Merged

refactor(terraform): revamp GenAI & ML infrastructure to lightweight application-level IaC#223
iht merged 2 commits into
GoogleCloudPlatform:mainfrom
iht:feat/revamp-ml-ai-terraform

Conversation

@iht

@iht iht commented Aug 23, 2026

Copy link
Copy Markdown
Member

Description

This PR refactors and modernizes the Terraform infrastructure and pipeline scripts for the GenAI & Machine Learning inference solution guide (terraform/ml_ai and pipelines/ml_ai_python), following the pattern established for the ETL/Integration use case in #221.

Key Changes

  • Lightweight Application Infrastructure (terraform/ml_ai):
    • Removed foundation-level resource creation (google_cloud_project, vpc_network, firewall_rules, regional_nat).
    • Simplified inputs to application variables: project_id, region, subnetwork, bucket_name, service_account_name, create_bucket, destroy_all_resources.
    • Upgraded Google Cloud Foundation Fabric module sources to v57.0.0.
    • Added modern Cloud Build service account ([PROJECT_NUMBER]-compute@developer.gserviceaccount.com) to Artifact Registry admin permissions.
  • Pipeline Scripts & Runtime Compatibility (pipelines/ml_ai_python):
    • Generated dynamic 00_set_variables.sh environment configuration.
    • Aligned Beam SDK version in Dockerfile (apache/beam_python3.11_sdk:2.75.0) to match requirements.txt.
    • Added --no_use_public_ips, --number_of_worker_harness_threads=1, and flexible GPU accelerator configuration to 02_run_dataflow.sh.
    • Added Python 3.11 version matching documentation to pipelines/ml_ai_python/README.md.
  • Documentation:
    • Updated terraform/ml_ai/README.md, pipelines/ml_ai_python/README.md, use_cases/GenAI_ML.md, and terraform/TERRAFORM_REVAMP_GUIDE.md.

Verification

  • Deployed infrastructure, built container image with Gemma 2B model weights, and launched streaming Dataflow GPU job on Google Cloud.
  • Verified prompt submission to Pub/Sub topic messages and received valid inference output from predictions-sub.
  • Clean teardown executed via terraform destroy.

@iht
iht merged commit 1b0c9db into GoogleCloudPlatform:main Aug 23, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant