Skip to main content

okustera_layer (Resource)

Registers and manages an AWS Lambda-like shared CephFS dependency layer for serverless functions in Okustera. Supports multi-tenancy, platform system layers, public catalogs, and cross-tenant RBAC sharing.

Example Usage​

Tenant-Scoped Python Data Science Layer​

resource "okustera_layer" "datascience" {
name = "python-datascience"
description = "Shared NumPy, Pandas, and SciPy libraries for serverless workers"
scope = "tenant"
visibility = "shared"

compatible_runtimes = [
"python3-http"
]
}

resource "okustera_layer_version" "v1" {
layer_id = okustera_layer.datascience.id

packages = [
"numpy==2.1.0",
"pandas==2.2.2",
"scipy==1.14.0"
]
}

output "layer_id" {
value = okustera_layer.datascience.id
}

Schema​

Required​

  • name (String, Forces new resource) Unique name of the shared layer.

Optional​

  • compatible_runtimes (List of String) Target execution runtimes supported by this layer (e.g. ["python3-http", "node22"]).
  • description (String) Human-readable description of dependencies provided by the layer.
  • scope (String, Forces new resource) Layer scope: tenant (project-scoped) or system (platform-wide, requires platform administrator). Defaults to tenant.
  • visibility (String) Sharing visibility: private, shared, or public. Defaults to private.

Read-Only​

  • created_at (String) Timestamp when layer was created.
  • created_by (String) User ID or principal that created this layer.
  • id (String) Unique layer identifier.
  • latest_version (Attributes) Metadata of the latest published layer version.
  • project_id (String) Owning tenant project identifier.
  • updated_at (String) Timestamp when layer metadata was last modified.
  • versions_count (Number) Total published version count for this layer.

Import​

Layers can be imported using their numeric layer id:

terraform import okustera_layer.example 10