Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • serverless_container

In this article:

  • Example usage
  • Schema
  • Optional
  • Read-Only
  • Nested Schema for connectivity
  • Nested Schema for metadata_options
  • Nested Schema for mounts
  • Nested Schema for mounts.ephemeral_disk
  • Nested Schema for mounts.object_storage
  • Nested Schema for runtime
  • Nested Schema for secrets
  • Nested Schema for storage_mounts
  • Nested Schema for async_invocation
  • Nested Schema for image
  • Nested Schema for log_options
  1. Terraform reference
  2. Resources
  3. Serverless Containers
  4. Data Sources
  5. serverless_container

yandex_serverless_container (Data Source)

Written by
Yandex Cloud
Updated at September 11, 2025
  • Example usage
  • Schema
    • Optional
    • Read-Only
    • Nested Schema for connectivity
    • Nested Schema for metadata_options
    • Nested Schema for mounts
    • Nested Schema for mounts.ephemeral_disk
    • Nested Schema for mounts.object_storage
    • Nested Schema for runtime
    • Nested Schema for secrets
    • Nested Schema for storage_mounts
    • Nested Schema for async_invocation
    • Nested Schema for image
    • Nested Schema for log_options

Get information about a Yandex Cloud Serverless Container. This data source is used to define Yandex Cloud Container that can be used by other resources.

Warning

Either container_id or name must be specified.

Example usageExample usage

//
// Get information about existing Serverless Container.
//
data "yandex_serverless_container" "my-container" {
  container_id = "are1samplecontainer11"
}

SchemaSchema

OptionalOptional

  • connectivity (Block List, Max: 1) (see below for nested schema)
  • container_id (String) Yandex Cloud Serverless Container ID used to define container.
  • folder_id (String) The folder identifier that resource belongs to. If it is not provided, the default provider folder-id is used.
  • metadata_options (Block List, Max: 1) (see below for nested schema)
  • mounts (Block List) (see below for nested schema)
  • name (String) The resource name.
  • runtime (Block List, Max: 1) (see below for nested schema)
  • secrets (Block List) (see below for nested schema)
  • storage_mounts (Block List, Deprecated) (see below for nested schema)

Read-OnlyRead-Only

  • async_invocation (List of Object) (see below for nested schema)
  • concurrency (Number) Concurrency of Yandex Cloud Serverless Container.
  • core_fraction (Number) Core fraction (0...100) of the Yandex Cloud Serverless Container.
  • cores (Number) Cores (1+) of the Yandex Cloud Serverless Container.
  • created_at (String) The creation timestamp of the resource.
  • description (String) The resource description.
  • execution_timeout (String) Execution timeout in seconds (duration format) for Yandex Cloud Serverless Container.
  • id (String) The ID of this resource.
  • image (List of Object) (see below for nested schema)
  • labels (Map of String) A set of key/value label pairs which assigned to resource.
  • log_options (List of Object) (see below for nested schema)
  • memory (Number) Memory in megabytes (aligned to 128 MB).
  • revision_id (String) Last revision ID of the Yandex Cloud Serverless Container.
  • service_account_id (String) Service account which linked to the resource.
  • url (String) Invoke URL for the Yandex Cloud Serverless Container.

Nested Schema for Nested Schema for connectivity

Required:

  • network_id (String) Network the revision will have access to.

Nested Schema for Nested Schema for metadata_options

Optional:

  • aws_v1_http_endpoint (Number) Enables access to AWS flavored metadata (IMDSv1). Values: 0 - default, 1 - enabled, 2 - disabled.

  • gce_http_endpoint (Number) Enables access to GCE flavored metadata. Values: 0- default, 1 - enabled, 2 - disabled.

Nested Schema for Nested Schema for mounts

Required:

  • mount_point_path (String) Path inside the container to access the directory in which the target is mounted.

Optional:

  • ephemeral_disk (Block List, Max: 1) One of the available mount types. Disk available during the function execution time. (see below for nested schema)

  • mode (String) Mount’s accessibility mode. Valid values are ro and rw.

  • object_storage (Block List, Max: 1) Available mount types. Object storage as a mount. (see below for nested schema)

Nested Schema for Nested Schema for mounts.ephemeral_disk

Required:

  • size_gb (Number) Size of the ephemeral disk in GB.

Optional:

  • block_size_kb (Number) Block size of the ephemeral disk in KB.

Nested Schema for Nested Schema for mounts.object_storage

Required:

  • bucket (String) Name of the mounting bucket.

Optional:

  • prefix (String) Prefix within the bucket. If you leave this field empty, the entire bucket will be mounted.

Nested Schema for Nested Schema for runtime

Required:

  • type (String) Type of the runtime for Yandex Cloud Serverless Container. Valid values are http and task.

Nested Schema for Nested Schema for secrets

Required:

  • environment_variable (String) Container's environment variable in which secret's value will be stored. Must begin with a letter (A-Z, a-z).

  • id (String) Secret's ID.

  • key (String) Secret's entries key which value will be stored in environment variable.

  • version_id (String) Secret's version ID.

Nested Schema for Nested Schema for storage_mounts

Required:

  • bucket (String) Name of the mounting bucket.

  • mount_point_path (String) Path inside the container to access the directory in which the bucket is mounted.

Optional:

  • prefix (String) Prefix within the bucket. If you leave this field empty, the entire bucket will be mounted.

  • read_only (Boolean) Mount the bucket in read-only mode.

Nested Schema for Nested Schema for async_invocation

Read-Only:

  • service_account_id (String) Service account used for async invocation.

Nested Schema for Nested Schema for image

Read-Only:

  • args (List of String) List of arguments for Yandex Cloud Serverless Container.

  • command (List of String) List of commands for Yandex Cloud Serverless Container.

  • digest (String) Digest of image that will be deployed as Yandex Cloud Serverless Container. If presented, should be equal to digest that will be resolved at server side by URL. Container will be updated on digest change even if image.0.url stays the same. If field not specified then its value will be computed.

  • environment (Map of String) A set of key/value environment variable pairs for Yandex Cloud Serverless Container. Each key must begin with a letter (A-Z, a-z).

  • url (String) URL of image that will be deployed as Yandex Cloud Serverless Container.

  • work_dir (String) Working directory for Yandex Cloud Serverless Container.

Nested Schema for Nested Schema for log_options

Read-Only:

  • disabled (Boolean) Is logging from container disabled.

  • folder_id (String) Log entries are written to default log group for specified folder.

  • log_group_id (String) Log entries are written to specified log group.

  • min_level (String) Minimum log entry level.

Was the article helpful?

Previous
function_trigger
Next
serverless_container
© 2025 Direct Cursus Technology L.L.C.