oci_functions_function

This resource provides the Function resource in Oracle Cloud Infrastructure Functions service.

Creates a new function.

Example Usage

resource "oci_functions_function" "test_function" {
    #Required
    application_id = oci_functions_application.test_application.id
    display_name = var.function_display_name
    memory_in_mbs = var.function_memory_in_mbs

    #Optional
    config = var.function_config
    defined_tags = {"Operations.CostCenter"= "42"}
    freeform_tags = {"Department"= "Finance"}
    image = var.function_image
    image_digest = var.function_image_digest
    provisioned_concurrency_config {
        #Required
        strategy = var.function_provisioned_concurrency_config_strategy

        #Optional
        count = var.function_provisioned_concurrency_config_count
    }
    source_details {
        #Required
        pbf_listing_id = oci_functions_pbf_listing.test_pbf_listing.id
        source_type = var.function_source_details_source_type
    }
    timeout_in_seconds = var.function_timeout_in_seconds
    trace_config {

        #Optional
        is_enabled = var.function_trace_config_is_enabled
    }
}

Argument Reference

The following arguments are supported:

* IMPORTANT * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Function * update - (Defaults to 20 minutes), when updating the Function * delete - (Defaults to 20 minutes), when destroying the Function

Import

Functions can be imported using the id, e.g.

$ terraform import oci_functions_function.test_function "id"