# sarath497/snowflake-infra-pulumi architecture

> Architecture diagram of the GitHub repository sarath497/snowflake-infra-pulumi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sarath497/snowflake-infra-pulumi
- Repository: https://github.com/sarath497/snowflake-infra-pulumi

## Overview

This repository defines Snowflake infrastructure as a Pulumi program. Its entry point imports modules that declare databases, schemas, a warehouse, an account role, and grants; the Pulumi Snowflake provider resources are the intended result. The excerpts show these declarations and the entry-point imports, but not deployment execution or provider internals, so those are not modeled as separate stages.

Main entry points: [`infra/__main__.py`](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/__main__.py) (Pulumi entry point), [`infra/src/databases.py`](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/databases.py) (Databases), [`infra/src/schemas.py`](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/schemas.py) (Schemas), [`infra/src/warehouses.py`](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/warehouses.py) (Warehouse)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Program entry"]
  node_main["Pulumi entry point<br/>[__main__.py]"]
end

subgraph group_data["Data resources"]
  node_databases["Databases<br/>[databases.py]"]
  node_schemas["Schemas<br/>[schemas.py]"]
  node_warehouse["Warehouse<br/>[warehouses.py]"]
end

subgraph group_access["Access resources"]
  node_roles["Account role<br/>[roles.py]"]
  node_grants["Privilege grants<br/>[grants.py]"]
end

node_snowflake[("Snowflake account")]

node_main -->|"imports"| node_databases
node_main -->|"imports"| node_schemas
node_main -->|"imports"| node_warehouse
node_main -->|"imports"| node_roles
node_main -->|"imports"| node_grants
node_databases -->|"declares databases"| node_snowflake
node_schemas -->|"declares schemas"| node_snowflake
node_warehouse -->|"declares warehouse"| node_snowflake
node_roles -->|"declares role"| node_snowflake
node_grants -->|"declares grants"| node_snowflake

click node_main "https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/__main__.py"
click node_databases "https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/databases.py"
click node_schemas "https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/schemas.py"
click node_warehouse "https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/warehouses.py"
click node_roles "https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/roles.py"
click node_grants "https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/grants.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main toneBlue
class node_databases,node_schemas,node_warehouse,node_snowflake toneAmber
class node_roles,node_grants toneMint
```

## Components

### Program entry

- [Pulumi entry point](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/__main__.py): `infra/__main__.py`

### Data resources

- [Databases](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/databases.py): `infra/src/databases.py`
- [Schemas](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/schemas.py): `infra/src/schemas.py`
- [Warehouse](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/warehouses.py): `infra/src/warehouses.py`

### Access resources

- [Account role](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/roles.py): `infra/src/roles.py`
- [Privilege grants](https://github.com/sarath497/snowflake-infra-pulumi/blob/main/infra/src/grants.py): `infra/src/grants.py`

### Other components

- **Snowflake account**

## Connections

- Pulumi entry point → Databases: imports (evidence: `infra/__main__.py`)
- Pulumi entry point → Schemas: imports (evidence: `infra/__main__.py`)
- Pulumi entry point → Warehouse: imports (evidence: `infra/__main__.py`)
- Pulumi entry point → Account role: imports (evidence: `infra/__main__.py`)
- Pulumi entry point → Privilege grants: imports (evidence: `infra/__main__.py`)
- Databases → Snowflake account: declares databases (evidence: `infra/src/databases.py`)
- Schemas → Snowflake account: declares schemas (evidence: `infra/src/schemas.py`)
- Warehouse → Snowflake account: declares warehouse (evidence: `infra/src/warehouses.py`)
- Account role → Snowflake account: declares role (evidence: `infra/src/roles.py`)
- Privilege grants → Snowflake account: declares grants (evidence: `infra/src/grants.py`)
