From 90a77ec0d977dc69f799df7e4f5e63c10a09f605 Mon Sep 17 00:00:00 2001 From: shanye Date: Fri, 6 Dec 2024 14:54:25 +0800 Subject: [PATCH] resource/alicloud_amqp_instance: add serverless in instance_type validation --- alicloud/resource_alicloud_amqp_instance.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/alicloud/resource_alicloud_amqp_instance.go b/alicloud/resource_alicloud_amqp_instance.go index 280fb737b6f2..ef9bf3388d4f 100644 --- a/alicloud/resource_alicloud_amqp_instance.go +++ b/alicloud/resource_alicloud_amqp_instance.go @@ -2,10 +2,11 @@ package alicloud import ( "fmt" - "github.com/PaesslerAG/jsonpath" "log" "time" + "github.com/PaesslerAG/jsonpath" + util "github.com/alibabacloud-go/tea-utils/service" "github.com/aliyun/terraform-provider-alicloud/alicloud/connectivity" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -44,7 +45,7 @@ func resourceAliCloudAmqpInstance() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: StringInSlice([]string{"professional", "enterprise", "vip"}, true), + ValidateFunc: StringInSlice([]string{"professional", "enterprise", "vip", "serverless"}, true), }, "max_connections": { Type: schema.TypeInt, @@ -662,6 +663,8 @@ func convertAmqpInstanceDataInstanceTypeResponse(source interface{}) interface{} return "vip" case "ENTERPRISE": return "enterprise" + case "SERVERLESS": + return "serverless" } return source }