» baiducloud_cfc_function

Provide a resource to create an CFC Function.

» Example Usage

resource "baiducloud_cfc_function" "default" {
  function_name  = "terraform-cfc"
  description    = "terraform create"
  handler        = "index.handler"
  memory_size    = 256
  runtime        = "nodejs12"
  time_out       = 20
  code_file_name = "../../baiducloud/testFiles/cfcTestCode.zip"
}

» Argument Reference

The following arguments are supported:

  • function_name - (Required, ForceNew) CFC function name, length must be between 1 and 64 bytes
  • handler - (Required) CFC Function execution handler
  • runtime - (Required) CFC Function runtime
  • time_out - (Required) Function time out, support [1, 300]s
  • code_bos_bucket - (Optional) CFC Function Code storage bos bucket name
  • code_bos_object - (Optional) CFC Function Code storage bos object key
  • code_file_dir - (Optional) CFC Function Code local file dir
  • code_file_name - (Optional) CFC Function Code local zip file name
  • description - (Optional) Function description
  • environment - (Optional) CFC Function environment variables
  • log_bos_dir - (Optional) Log save dir if log type is bos
  • log_type - (Optional) Log save type, support bos/none
  • memory_size - (Optional) CFC Function memory size, should be an integer multiple of 128
  • reserved_concurrent_executions - (Optional) Function reserved concurrent executions, support [0-90]

» Attributes Reference

In addition to all arguments above, the following attributes are exported:

» Import

CFC can be imported, e.g.

$ terraform import baiducloud_cfc_function.default functionName