From 25effa96b23c816cf6cfaef0c54c92aa0de6174a Mon Sep 17 00:00:00 2001 From: Jason Zhang Date: Sat, 29 May 2021 17:26:26 +0800 Subject: [PATCH] mark dms_instance as deprecated --- docs/resources/dms_instance.md | 5 ++++- huaweicloud/resource_huaweicloud_dms_instance_v1.go | 1 + huaweicloud/resource_huaweicloud_dms_instance_v1_test.go | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/resources/dms_instance.md b/docs/resources/dms_instance.md index bc898013b5..c229a2ed1f 100644 --- a/docs/resources/dms_instance.md +++ b/docs/resources/dms_instance.md @@ -1,9 +1,12 @@ --- -subcategory: "Distributed Message Service (DMS)" +subcategory: "Deprecated" --- # huaweicloud\_dms\_instance +!> **Warning:** It has been deprecated, use `huaweicloud_dms_kafka_instance` or + `huaweicloud_dms_rabbitmq_instance` instead. + Manages a DMS instance in the huaweicloud DMS Service. This is an alternative to `huaweicloud_dms_instance_v1` diff --git a/huaweicloud/resource_huaweicloud_dms_instance_v1.go b/huaweicloud/resource_huaweicloud_dms_instance_v1.go index b60b526c02..7c5c7bc086 100644 --- a/huaweicloud/resource_huaweicloud_dms_instance_v1.go +++ b/huaweicloud/resource_huaweicloud_dms_instance_v1.go @@ -24,6 +24,7 @@ func resourceDmsInstancesV1() *schema.Resource { Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, + DeprecationMessage: "use huaweicloud_dms_kafka_instance or huaweicloud_dms_rabbitmq_instance instead", Schema: map[string]*schema.Schema{ "region": { diff --git a/huaweicloud/resource_huaweicloud_dms_instance_v1_test.go b/huaweicloud/resource_huaweicloud_dms_instance_v1_test.go index bf5151f883..b8d191a900 100644 --- a/huaweicloud/resource_huaweicloud_dms_instance_v1_test.go +++ b/huaweicloud/resource_huaweicloud_dms_instance_v1_test.go @@ -18,7 +18,7 @@ func TestAccDmsInstancesV1_Rabbitmq(t *testing.T) { resourceName := "huaweicloud_dms_instance.instance_1" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheckDms(t) }, + PreCheck: func() { testAccPreCheckDeprecated(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDmsV1InstanceDestroy, Steps: []resource.TestStep{ @@ -52,7 +52,7 @@ func TestAccDmsInstancesV1_Kafka(t *testing.T) { resourceName := "huaweicloud_dms_instance.instance_1" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheckDms(t) }, + PreCheck: func() { testAccPreCheckDeprecated(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDmsV1InstanceDestroy, Steps: []resource.TestStep{