yandex_function (Data Source)
- 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 secrets
- Nested Schema for storage_mounts
- Nested Schema for async_invocation
- Nested Schema for async_invocation.ymq_failure_target
- Nested Schema for async_invocation.ymq_success_target
- Nested Schema for log_options
Get information about a Yandex Cloud Function. For more information about Yandex Cloud Functions, see Yandex Cloud Functions.
This data source is used to define Yandex Cloud Function that can be used by other resources.
Важно
Either function_id or name must be specified.
Example usage
//
// Get information about existing Yandex Cloud Function
//
data "yandex_function" "my_function" {
function_id = "d4e45**********pqvd3"
}
Schema
Optional
concurrency(Number) The maximum number of requests processed by a function instance at the same time.connectivity(Block List, Max: 1) (see below for nested schema)folder_id(String) The folder identifier that resource belongs to. If it is not provided, the default providerfolder-idis used.function_id(String) Yandex Cloud Function id used to define function.metadata_options(Block List, Max: 1) (see below for nested schema)mounts(Block List) (see below for nested schema)name(String) The resource name.secrets(Block List) (see below for nested schema)storage_mounts(Block List, Deprecated) (see below for nested schema)
Read-Only
async_invocation(List of Object) (see below for nested schema)created_at(String) The creation timestamp of the resource.description(String) The resource description.entrypoint(String) Entrypoint for Yandex Cloud Function.environment(Map of String) A set of key/value environment variables for Yandex Cloud Function. Each key must begin with a letter (A-Z, a-z).execution_timeout(String) Execution timeout in seconds for Yandex Cloud Function.id(String) The ID of this resource.image_size(Number) Image size for Yandex Cloud Function.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 128MB) for Yandex Cloud Function.runtime(String) Runtime for Yandex Cloud Function.service_account_id(String) Service account which linked to the resource.tags(Set of String) Tags for Yandex Cloud Function. Tag$latestisn't returned.tmpfs_size(Number) Tmpfs size for Yandex Cloud Function.version(String) Version of Yandex Cloud Function.
Nested Schema for connectivity
Required:
network_id(String) Network the version will have access to. It's essential to specify network with subnets in all availability zones.
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 mounts
Required:
name(String) Name of the mount point. The directory where the target is mounted will be accessible at the/function/storage/<mounts.0.name>path.
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 areroandrw. -
object_storage(Block List, Max: 1) One of the available mount types. Object storage as a mount. (see below for nested schema)
Nested Schema for mounts.ephemeral_disk
Required:
size_gb(Number) Size of the ephemeral disk in GB.
Optional:
block_size_kb(Number) Optional block size of the ephemeral disk in KB.
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 secrets
Required:
-
environment_variable(String) Function'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 storage_mounts
Required:
-
bucket(String) Name of the mounting bucket. -
mount_point_name(String) Name of the mount point. The directory where the bucket is mounted will be accessible at the/function/storage/<mount_point>path.
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 async_invocation
Read-Only:
-
retries_count(Number) Maximum number of retries for async invocation. -
service_account_id(String) Service account used for async invocation. -
ymq_failure_target(Block List, Max: 1) Target for unsuccessful async invocation. (see below for nested schema) -
ymq_success_target(Block List, Max: 1) Target for successful async invocation. (see below for nested schema)
Nested Schema for async_invocation.ymq_failure_target
Read-Only:
-
arn(String) YMQ ARN. -
service_account_id(String) Service account used for writing result to queue.
Nested Schema for async_invocation.ymq_success_target
Read-Only:
-
arn(String) YMQ ARN. -
service_account_id(String) Service account used for writing result to queue.
Nested Schema for log_options
Read-Only:
-
disabled(Boolean) Is logging from function 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.