Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions terraform-reference/data-sources/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ output "production_type" {
value = data.kosli_environment.production.type
}

output "production_includes_scaling" {
description = "Whether production environment includes scaling events"
value = data.kosli_environment.production.include_scaling
}

# Access tags applied to the environment
output "production_tags" {
description = "Tags applied to the production environment"
Expand Down Expand Up @@ -108,7 +103,6 @@ Data sources provide read-only access to environment metadata. To modify environ
### 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.
Expand Down
23 changes: 7 additions & 16 deletions terraform-reference/resources/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ resource "kosli_environment" "tagged" {
}
}

# ECS environment with scaling
# ECS environment
resource "kosli_environment" "staging_ecs" {
name = "staging-ecs"
type = "ECS"
description = "Staging ECS cluster"
include_scaling = true
name = "staging-ecs"
type = "ECS"
description = "Staging ECS cluster"
}

# S3 environment
Expand All @@ -80,10 +79,9 @@ resource "kosli_environment" "local_docker" {

# Server environment
resource "kosli_environment" "production_servers" {
name = "production-servers"
type = "server"
description = "Production bare-metal servers"
include_scaling = false
name = "production-servers"
type = "server"
description = "Production bare-metal servers"
}

# Lambda environment
Expand All @@ -105,12 +103,6 @@ The `type` attribute must be one of the following physical environment types:
- `server` - Bare-metal or VM servers
- `lambda` - AWS Lambda functions

## Configuration options

### Include scaling

The `include_scaling` attribute (default: `false`) determines whether scaling events in the environment should be tracked. This is useful for environments with auto-scaling where you want to monitor scale-up and scale-down events.

## Import

Environments can be imported using their name:
Expand Down Expand Up @@ -140,5 +132,4 @@ For querying environment metadata such as `last_modified_at` and `last_reported_
### Optional

- `description` (String) Description of the environment. Explains the purpose and characteristics of this deployment target.
- `include_scaling` (Boolean) Whether to include scaling information when reporting environment snapshots. Defaults to `false`.
- `tags` (Map of String) Key-value pairs to tag the environment. Tags are applied via a diff — only changed tags are sent to the API. An empty map (`tags = {}`) removes all tags.
Loading