Free · IaC Starter Kit

Terraform & Bicep Starter Templates

Five starters I reach for on real projects: secure defaults, scale-to-zero, keyless pipelines and FinOps tags built in. Copy, adapt, ship.

Terraform · Cloud Run service with GitHub keyless deploys
Terraform · Azure workload baseline with enforced tags
Terraform · Terraform remote state on AWS
Bicep · Azure Container App with managed identity
GitHub Actions · Terraform plan on every pull request

Get it free

Enter your email to unlock instant access

No spam. Unsubscribe from The CognitiveOps Brief anytime.

The templates

Starters, not finished platforms: review names, regions, sizes and access before you apply them. Each file lists its variables at the top.

TerraformGCPmain.tf

Cloud Run service with GitHub keyless deploys

A container service that scales to zero, an Artifact Registry repo, and Workload Identity Federation so GitHub Actions deploys without a service-account key.

  • Artifact Registry repository
  • Cloud Run v2 service, min 0 instances
  • Deploy service account with least-privilege roles
  • Workload Identity pool restricted to one GitHub repo

Enter your email above to unlock the code.

TerraformAzuremain.tf

Azure workload baseline with enforced tags

A resource group, virtual network, Log Analytics workspace and an Azure Policy assignment that denies resources missing your FinOps tags.

  • Resource group and VNet with two subnets
  • Log Analytics workspace (30-day retention)
  • Mandatory tags applied to every resource
  • Built-in "Require a tag on resources" policy, one assignment per tag

Enter your email above to unlock the code.

TerraformAWSmain.tf

Terraform remote state on AWS

An encrypted, versioned S3 bucket for Terraform state with public access blocked, plus default tags on everything the provider creates.

  • S3 bucket with versioning and encryption
  • All public access blocked; TLS-only bucket policy
  • Native S3 state locking (Terraform 1.10+), no DynamoDB table
  • Provider default_tags for FinOps

Enter your email above to unlock the code.

BicepAzuremain.bicep

Azure Container App with managed identity

A Container Apps environment wired to Log Analytics and an app that scales to zero, using a system-assigned managed identity instead of secrets.

  • Log Analytics workspace
  • Container Apps environment
  • Container App, 0–5 replicas, HTTP ingress
  • System-assigned managed identity; tags on every resource

Enter your email above to unlock the code.

GitHub ActionsAny.github/workflows/terraform-plan.yml

Terraform plan on every pull request

Format, validate, security-scan and plan on each pull request, using OIDC (no stored cloud keys), with the plan posted as a PR comment.

  • terraform fmt and validate
  • Checkov IaC security scan
  • terraform plan with keyless OIDC login (GCP example)
  • Plan summary as a PR comment

Enter your email above to unlock the code.

Make infrastructure a golden path

Templates help one team. A platform with policy-as-code helps every team. The DevOps assessment shows where your platform stands.