Fetches details of an existing Kosli environment. Use this data source to reference environments and access metadata like last modified and last reported timestamps. Environments represent runtime locations where artifacts are deployed and tracked for compliance monitoring. Use this data source to:Documentation Index
Fetch the complete documentation index at: https://docs.kosli.com/llms.txt
Use this file to discover all available pages before exploring further.
- Reference existing environment configurations in other resources
- Monitor environment activity (last modified, last reported timestamps)
- Create conditional logic based on environment state
- Build alerts and notifications based on environment metadata
Example usage
Monitoring with data sources
The data source exposes timestamp fields that are useful for monitoring:last_modified_at: Unix timestamp of when the environment configuration was last changedlast_reported_at: Unix timestamp of when the environment last reported a snapshot (can be null if never reported)
- Create alerts for environments that haven’t reported in a certain time period
- Track configuration changes across your infrastructure
- Build dashboards showing environment activity
- Implement conditional deployment logic based on environment state
Read-only access
Data sources provide read-only access to environment metadata. To modify environment configurations, use thekosli_environment resource.
Schema
Required
name(String) The name of the environment to query.
Read-only
description(String) The description of the environment.include_scaling(Boolean) Whether the environment includes scaling events in snapshots.last_modified_at(Number) Unix timestamp (with fractional seconds) of when the environment was last modified.last_reported_at(Number) Unix timestamp (with fractional seconds) of when the environment was last reported. May be null if never reported.tags(Map of String) Key-value pairs tagging the environment.type(String) The environment type (e.g., K8S, ECS, S3, docker, server, lambda).