Skip to content

Commit

Permalink
More docs
Browse files Browse the repository at this point in the history
  • Loading branch information
teej committed Nov 8, 2024
1 parent 6fde3d8 commit 86a28ca
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 9 deletions.
35 changes: 26 additions & 9 deletions docs/blueprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,36 @@ bp.apply(session, plan)
```

## Blueprint parameters
- **run_mode** (`str`): Defines how the blueprint interacts with the Snowflake account
**run_mode** `str`
- Defines how the blueprint interacts with the Snowflake account
- **create-or-update** (*default*): Resources are either created or updated, no resources are destroyed
- **sync**:
- `⚠️ WARNING` Sync mode will drop resources.
- Titan will update Snowflake to match the blueprint exactly. Must be used with `allowlist`.
- **resources** (`list[Resource]`): List of resources initialized in the blueprint.
- **allowlist** (`list[str]`): Specifies the allowed resource types in the blueprint.
- **dry_run** (`bool`): `apply()` will return a list of SQL commands that would be executed without applying them.
- **vars** (`dict`): A key-value dictionary that specifies the names and values of vars.
- **vars_spec** (`list[dict]`): A list of dictionaries defining the `name`, `type` and `default` (optional) of all expected vars.
- **scope** (`str`): Limit Titan's scope to a single database or schema. Must be one of "DATABASE" or "SCHEMA". If not specified, Titan will manage any resource.
- **database** (`str`): The name of a database to limit Titan's scope to. Must be used with `scope`.
- **schema** (`str`): The name of a schema to limit Titan's scope to. Must be used with `scope` and `database`.

**resources** `list[Resource]`
- List of resources initialized in the blueprint.

**allowlist** `list[str]`
- Specifies the allowed resource types in the blueprint.

**dry_run** `bool`
- `apply()` will return a list of SQL commands that would be executed without applying them.

**vars** `dict`
- A key-value dictionary that specifies the names and values of vars.

**vars_spec** `list[dict]`
- A list of dictionaries defining the `name`, `type` and `default` (optional) of all expected vars.

**scope** `str`
- Limit Titan's scope to a single database or schema. Must be one of "DATABASE" or "SCHEMA". If not specified, Titan will manage any resource.

**database** `str`
- The name of a database to limit Titan's scope to. Must be used with `scope`.

**schema** `str`
- The name of a schema to limit Titan's scope to. Must be used with `scope` and `database`.

## Methods

Expand Down
37 changes: 37 additions & 0 deletions docs/titan-core-github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,43 @@ role_grants:

When you push to `main` changes to files in the `titan/` directory, the Github Action will deploy them to Snowflake.

## Configuration options

**run-mode** `string`

Defines how the blueprint interacts with the Snowflake account

- Default: `"create-or-update"`
- **create-or-update**
- Resources are either created or updated, no resources are destroyed
- **sync**:
- `⚠️ WARNING` Sync mode will drop resources.
- Titan will update Snowflake to match the blueprint exactly. Must be used with `allowlist`.

**resource-path** `string`

Defines the file or directory where Titan will look for the resource configs

- Default: `"."`

**allowlist** `list[string] or "all"`

Defines which resource types are allowed

- Default: `"all"`

**dry_run** `bool`

**vars** `dict`

**vars_spec** `list[dict]`

**scope** `str`

**database** `str`

**schema** `str`

## Ignore files with `.titanignore`

If you specify a directory as the `resource-path`, Titan will recursively look for all files with a `.yaml` or `.yml` file extension. You can tell Titan to exclude files or directories with a `.titanignore` file. This file uses [gitignore syntax](https://git-scm.com/docs/gitignore).
Expand Down

0 comments on commit 86a28ca

Please sign in to comment.