alicloud_pai_service

更新时间:

Provides a PAI Service resource.

Eas service instance.

For information about PAI Service and how to use it, see What is Service.

-> NOTE: Field labels has been removed since version 1.245.0. Please use new field tags.

-> NOTE: Available since v1.238.0.

Example Usage

Basic Usage


variable "name" {
  default = "terraform-example"
}

provider "alicloud" {
  region = "cn-hangzhou"
}

resource "alicloud_pai_service" "default" {
  develop        = "false"
  service_config = jsonencode({ "metadata" : { "cpu" : 1, "gpu" : 0, "instance" : 1, "memory" : 2000, "name" : "tfexample", "rpc" : { "keepalive" : 70000 } }, "model_path" : "http://eas-data.oss-cn-shanghai.aliyuncs.com/processors/echo_processor_release.tar.gz", "processor_entry" : "libecho.so", "processor_path" : "http://eas-data.oss-cn-shanghai.aliyuncs.com/processors/echo_processor_release.tar.gz", "processor_type" : "cpp" })
}

Argument Reference

The following arguments are supported:

  • develop - (Optional) Whether to enter the development mode.
  • service_config - (Required, JsonString) Service configuration information. Please refer to https://www.alibabacloud.com/help/en/pai/user-guide/parameters-of-model-services
  • status - (Optional, Computed) Service Current Status.
  • tags - (Optional, Map, Available since v1.245.0) The tag of the resource.
  • workspace_id - (Optional) Workspace id

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.
  • create_time - Creation time of the service
  • region_id - The region ID of the resource

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 5 mins) Used when create the Service.
  • delete - (Defaults to 5 mins) Used when delete the Service.
  • update - (Defaults to 16 mins) Used when update the Service.

Import

PAI Service can be imported using the id, e.g.

$ terraform import alicloud_pai_service.example <id>