Skip to content

Streamlit Deployment

Huzefaaa2 edited this page May 14, 2026 · 10 revisions

Streamlit Deployment

Local

Run the v1 Foundation demo:

pip install -e .
streamlit run streamlit_app.py

Run the v2 Enterprise + Intelligence demo:

pip install -e .
streamlit run streamlit_app_v2.py

Run the v3-v5 Governance demo:

pip install -e .
streamlit run streamlit_app_v3_v5.py

Run the v1-v5 Full platform demo:

pip install -e .
streamlit run streamlit_app_full.py

Live Apps

App Purpose URL
v1 Foundation Terraform scanning, state leak checks, schema-aware validation https://terraform-guardrail.streamlit.app/
v2 Enterprise + Intelligence Policy authoring, org baselines, drift gates, evidence export, risk profiles, suggested fixes, waiver demos https://terraform-guardrail-enterprise.streamlit.app/
v3-v5 Governance Policy packs, explainability, SARIF/JUnit, remediation plans, PR dry runs, scheduled scans, evidence schedules, health and trend dashboards https://terraform-guardrail-governance.streamlit.app/
v1-v5 Full platform Scanner, policy catalog, enterprise evaluation, policy packs, drift, evidence, explainability, remediation, schedules, health, and case-study playbooks https://terraform-guardrail-platform.streamlit.app/

All apps link to each other and to the author profile: https://www.linkedin.com/in/huzefaaa

Streamlit Cloud

  1. Push the repo to GitHub.
  2. Create one Streamlit Cloud app for v1.
  3. Main file: streamlit_app.py.
  4. Create a second Streamlit Cloud app for v2.
  5. Main file: streamlit_app_v2.py.
  6. Create a third Streamlit Cloud app for v3-v5.
  7. Main file: streamlit_app_v3_v5.py.
  8. Create a fourth Streamlit Cloud app for v1-v5.
  9. Main file: streamlit_app_full.py.
  10. Deploy (Streamlit installs dependencies from requirements.txt).

Recommended settings:

  • Branch: main
  • Python version: read from runtime.txt
  • Theme: read from .streamlit/config.toml
  • Secrets: none required for the public v1, v2, v3-v5, or v1-v5 demos
  • v2 app URL/name: terraform-guardrail-enterprise
  • v3-v5 app URL/name: terraform-guardrail-governance
  • v1-v5 app URL/name: terraform-guardrail-platform

Container Deployment

Run the v1 Foundation app:

docker build -f Dockerfile.streamlit -t terraform-guardrail-streamlit:v1 .
docker run --rm -p 8501:8501 terraform-guardrail-streamlit:v1

Run the v2 Enterprise + Intelligence app:

docker build -f Dockerfile.streamlit.v2 -t terraform-guardrail-streamlit:v2 .
docker run --rm -p 8502:8501 terraform-guardrail-streamlit:v2

Run the v3-v5 Governance app:

docker build -f Dockerfile.streamlit.v3_v5 -t terraform-guardrail-streamlit:v3-v5 .
docker run --rm -p 8503:8501 terraform-guardrail-streamlit:v3-v5

Run the v1-v5 Full platform app:

docker build -f Dockerfile.streamlit.full -t terraform-guardrail-streamlit:full .
docker run --rm -p 8504:8501 terraform-guardrail-streamlit:full

Troubleshooting

  • If a cloud app reports ImportError for terraform_guardrail, reboot the app so Streamlit Cloud reinstalls from requirements.txt. The apps also include a repo src/ fallback for stale cloud builds.
  • Use Python from runtime.txt and keep requirements.txt at the repo root.

Clone this wiki locally