Skip to content

DOC-428: Update remainder of Snowflake docs to push lstk - #908

Open
quetzalliwrites wants to merge 1 commit into
mainfrom
doc-428-docs-update-remainder-of-snow-docs-for-pushing-lstk
Open

DOC-428: Update remainder of Snowflake docs to push lstk#908
quetzalliwrites wants to merge 1 commit into
mainfrom
doc-428-docs-update-remainder-of-snow-docs-for-pushing-lstk

Conversation

@quetzalliwrites

Copy link
Copy Markdown
Collaborator

Summary

Follows the same lstk migration already done for AWS/Azure docs, and for Snowflake Getting Started in #878. This covers everything else under /snowflake/ that still referenced the legacy localstack CLI (scoped by grepping the whole tree for localstack start/--stack snowflake/`localstack` CLI and excluding getting-started/, which #878 already owns):

  • capabilities/configuration.md: rewrote the env var intro and the "CLI" section to match aws/customization/configuration-options.md's already-established pattern (LOCALSTACK_-prefixed env vars, .lstk/config.toml env profiles, cross-link to the lstk config reference). Dropped the "Profiles" section entirely — CONFIG_PROFILE/*.env files have no lstk equivalent, which is exactly why the AWS docs already dropped this section rather than translating it. Folded LOCALSTACK_VOLUME_DIR into the Docker table, again matching AWS.
  • capabilities/init-hooks.mdx: replaced the "CLI" tab with the lstk .lstk/config.toml volumes pattern, matching aws/customization/advanced/initialization-hooks.mdx.
  • capabilities/state-management.mdx: PERSISTENCE=1 localstack startlstk start --persist; localstack state export/importlstk snapshot save/load, matching the AWS persistence and snapshots docs.
  • tooling/user-interface.md and the three tutorials: swapped the `localstack` CLI prerequisite links and localstack start --stack snowflake invocations for lstk/lstk start --type snowflake, and prefixed forwarded env vars with LOCALSTACK_ where needed (required for lstk start to forward them into the container).

awslocal wrapper usage in the tutorials was left untouched — that's a separate, still-supported wrapper script, not the legacy localstack CLI this ticket targets.

Linear ticket

https://linear.app/localstack/issue/DOC-428/docs-update-remainder-of-snow-docs-for-pushing-lstk

Test plan

  • npx astro build completes successfully (405 pages built)
  • Link validator confirms all internal links are valid
  • Swept the full /snowflake/ tree afterward for any remaining localstack start/--stack snowflake/legacy CLI references outside getting-started/ — none found

Follows the same lstk migration already done for AWS/Azure docs and
for Snowflake Getting Started (#878). Covers everything else under
/snowflake/ that still referenced the legacy `localstack` CLI:

- capabilities/configuration.md: rewrite the env var intro and the
  "CLI" section to match AWS's configuration-options.md pattern
  (LOCALSTACK_-prefixed env vars, .lstk/config.toml env profiles,
  cross-link to the lstk config reference). Drop the "Profiles"
  section entirely (CONFIG_PROFILE/*.env files have no lstk
  equivalent, same as the AWS docs already did) and fold
  LOCALSTACK_VOLUME_DIR into the Docker table.
- capabilities/init-hooks.mdx: replace the CLI tab with the lstk
  .lstk/config.toml `volumes` pattern, matching
  aws/customization/advanced/initialization-hooks.mdx.
- capabilities/state-management.mdx: `PERSISTENCE=1 localstack start`
  -> `lstk start --persist`; `localstack state export/import` ->
  `lstk snapshot save/load`, matching the AWS persistence and
  snapshots docs.
- tooling/user-interface.md and the three tutorials: swap the
  `localstack` CLI prerequisite links and `localstack start --stack
  snowflake` invocations for `lstk`/`lstk start --type snowflake`,
  and prefix forwarded env vars with LOCALSTACK_ where needed.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying localstack-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8ccb645
Status: ✅  Deploy successful!
Preview URL: https://570f8893.localstack-docs.pages.dev
Branch Preview URL: https://doc-428-docs-update-remainde.localstack-docs.pages.dev

View logs

@mmaureenliu mmaureenliu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. Some minor comments to address but I'll pre-approve.

When you use the `localstack` CLI, add the `LOCALSTACK_` prefix so the CLI passes the variable to the container:
When you use `lstk`, add the `LOCALSTACK_` prefix so the CLI passes the variable to the container:

```bash

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend using the lstk config file to do this: see my reply in https://linear.app/localstack/issue/PRO-327/verify-lstk-behavior-in-capabilitiesconfigurationmd

CUSTOM_SSL_CERT_PATH=/var/lib/localstack/custom/cert.pem \
SKIP_SSL_CERT_DOWNLOAD=1 \
localstack start --stack snowflake
lstk start

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env = ["debug"]
volumes = ["/path/to/test.sf.sql:/etc/localstack/init/ready.d/test.sf.sql"]

[env.debug]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add an inline comment here saying: "Optionally enable DEBUG" as DEBUG is not required for init hook but helps to diagnose init hook issues

PERSISTENCE=1 \
localstack start --stack snowflake
lstk start --persist
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth adding a note that to resume a persisted session after the emulator stopped, or to restart a session while keeping persistence on, you also need this flag, i.e.

lstk stop
lstk start --persist

and

lstk restart --persist


```bash
localstack state export '<file-name>'
lstk snapshot save '<file-name>'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since file-name here mostly associates with a path, I'd suggest lstk snapshot save <path-to-snapshot-file>

```

You can use the `<file-name>` argument to specify a file path to export the state to. If you do not specify a file path, the state will be exported to the current working directory into a file named `ls-state-export`.
You can use the `<file-name>` argument to specify a file path to export the state to. If you do not specify a file path, the state will be exported to the current working directory into an auto-named snapshot file.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's helpful to link to the snapshot section of the lstk doc for more info on supported save destinations (local and remote).


```bash
localstack state import '<file-name>'
lstk snapshot load '<file-name>'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you agree with using above then this also changes to lstk snapshot load <path-to-snapshot-file>

```bash
export LOCALSTACK_AUTH_TOKEN=<your_auth_token>
localstack start --stack snowflake
lstk start --type snowflake

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply lstk start

```bash
export LOCALSTACK_AUTH_TOKEN=<your_auth_token>
localstack start --stack snowflake
lstk start --type snowflake

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply lstk start

@mmaureenliu

Copy link
Copy Markdown

Actually found a (slightly) bigger problem on Peter's reminder: awslocal is still used in snowpipe.md, glue-catalog.md, storage-integrations.md, stages.mdx, dynamic-tables.md, iceberg-tables.md, polaris-catalog.md, airflow.md, aws-lambda-localstack-snowpark.md, s3-tables-iceberg-integration.md

All should be updated to lstk aws but this could be a simple search & replace fix.

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.

2 participants