| name | palantir-multi-env-setup |
| description | Configure Palantir Foundry across development, staging, and production environments.
Use when setting up multi-environment Foundry deployments, managing per-environment
credentials, or implementing environment-specific configurations.
Trigger with phrases like "palantir environments", "foundry staging",
"foundry dev prod", "palantir environment setup".
|
| allowed-tools | Read, Write, Edit, Bash(gcloud:*) |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","palantir","foundry","environments","configuration"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Palantir Multi-Environment Setup
Overview
Configure Foundry integrations across dev/staging/prod environments with separate credentials, enrollment hostnames, and scope policies per environment.
Prerequisites
- Foundry enrollments for each environment (or separate projects within one enrollment)
- Secrets manager (AWS SM, GCP SM, or Vault)
- Familiarity with
palantir-security-basics
Instructions
Step 1: Environment Configuration
import os
from dataclasses import dataclass
@dataclass
class FoundryEnvConfig:
hostname: str
client_id: str
client_secret: str
scopes: list[str]
ontology: str
ENVIRONMENTS = {
"development": FoundryEnvConfig(
hostname=os.environ.get("DEV_FOUNDRY_HOSTNAME", "dev.palantirfoundry.com"),
client_id=os.environ.get("DEV_FOUNDRY_CLIENT_ID", ""),
client_secret=os.environ.get("DEV_FOUNDRY_CLIENT_SECRET", ""),
scopes=["api:read-data"],
ontology="dev-ontology",
),
"staging": FoundryEnvConfig(
hostname=os.environ.get("STG_FOUNDRY_HOSTNAME", "staging.palantirfoundry.com"),
client_id=os.environ.get("STG_FOUNDRY_CLIENT_ID", ""),
client_secret=os.environ.get("STG_FOUNDRY_CLIENT_SECRET", ""),
scopes=["api:read-data", "api:write-data"],
ontology="staging-ontology",
),
: FoundryEnvConfig(
hostname=os.environ.get(, ),
client_id=os.environ.get(, ),
client_secret=os.environ.get(, ),
scopes=[, , ],
ontology=,
),
}
() -> FoundryEnvConfig:
env = os.environ.get(, )
ENVIRONMENTS[env]