alicloud_fcv3_function_version
更新时间:
Provides a FCV3 Function Version resource.
Version of the function.
For information about FCV3 Function Version and how to use it, see What is Function Version.
-> NOTE: Available since v1.228.0.
Example Usage
Basic Usage
variable "name" {
default = "terraform-example"
}
provider "alicloud" {
region = "cn-hangzhou"
}
resource "random_uuid" "default" {
}
resource "alicloud_fcv3_function" "function" {
memory_size = "512"
cpu = 0.5
handler = "index.Handler"
code {
zip_file = "UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA="
}
function_name = "${var.name}-${random_uuid.default.result}"
runtime = "python3.9"
disk_size = "512"
log_config {
log_begin_rule = "None"
}
}
resource "alicloud_fcv3_function_version" "default" {
function_name = alicloud_fcv3_function.function.function_name
description = "version1"
}
Argument Reference
The following arguments are supported:
description
- (Optional, ForceNew) Description of the function versionfunction_name
- (Required, ForceNew) Function Name
Attributes Reference
The following attributes are exported:
id
- The ID of the resource supplied above.The value is formulated as<function_name>:<version_id>
.create_time
- The creation time of the resource
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Function Version.delete
- (Defaults to 5 mins) Used when delete the Function Version.
Import
FCV3 Function Version can be imported using the id, e.g.
$ terraform import alicloud_fcv3_function_version.example <function_name>:<version_id>
文档内容是否对您有帮助?