# CLAUDE.md

This file provides guidance to Claude Code when working with this repository.

## Project Overview

Shared Pulumi IaC TypeScript library providing reusable helper functions and types for provisioning infrastructure across GCP, AWS, and Kubernetes. Used as a dependency (`@atomisthq/pulumi`) by the platform's IaC projects.

## Repository Structure

- `index.ts` - Main entry point, re-exports all modules
- `lib/` - Module implementations
  - `dns.ts` - DNS record helpers
  - `docker.ts` - Docker infrastructure helpers
  - `gcp/` - GCP-specific modules (AlloyDB, Secrets, Spanner, Storage, Tailscale)
  - `iam.ts` - IAM policy and role management
  - `k8s/` - Kubernetes modules (networking, policy, RBAC, provider, SDM, spec)
  - `label.ts` - Resource labeling conventions
  - `postgres.ts` - PostgreSQL provisioning
  - `pubsub.ts` - Pub/Sub helpers
  - `vpn.ts` - VPN configuration
  - `workloadIdentity.ts` - GCP Workload Identity
  - `assets.ts` - Asset management
  - `stringUtils.ts` - String utility functions
- `test/` - Mocha test files
- `assets/` - Static assets

## Build and Test Commands

```bash
# Full build pipeline (clean, compile, test, lint, doc)
npm run build

# Install dependencies
npm ci

# Compile TypeScript
npm run compile

# Run tests
npm run test

# Lint
npm run lint
npm run lint:fix
```

## Key Patterns

- All modules are re-exported through `index.ts` as namespaced imports
- TypeScript strict mode enabled with declaration maps and source maps
- Target: ES2016, Module: Node16
- Uses `@pulumi/pulumi`, `@pulumi/gcp`, `@pulumi/aws`, `@pulumi/kubernetes`, `@pulumi/datadog` providers
- Releases are triggered by pushing semver git tags

## Important Configuration

- `package.json` - Dependencies, scripts, npm metadata (version 2.1.4)
- `tsconfig.json` - TypeScript compiler options (strict, Node16 module resolution)
- `eslint.config.mjs` - ESLint configuration
- `.prettierrc.json` - Prettier formatting rules
