diff --git a/tencentcloud/resource_tc_cbs_storage.go b/tencentcloud/resource_tc_cbs_storage.go index a19ed6aaaa..ca75f48b79 100644 --- a/tencentcloud/resource_tc_cbs_storage.go +++ b/tencentcloud/resource_tc_cbs_storage.go @@ -54,13 +54,12 @@ func resourceTencentCloudCbsStorage() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "Type of CBS medium. Valid values: CLOUD_PREMIUM, CLOUD_SSD, CLOUD_TSSD and CLOUD_HSSD.", + Description: "Type of CBS medium. Valid values: CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_BSSD: General Purpose SSD, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD.", }, "storage_size": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validateIntegerInRange(10, 16000), - Description: "Volume of CBS, and unit is GB. If storage type is `CLOUD_SSD`, the size range is [100, 16000], and the others are [10-16000].", + Type: schema.TypeInt, + Required: true, + Description: "Volume of CBS, and unit is GB.", }, "period": { Deprecated: "It has been deprecated from version 1.33.0. Set `prepaid_period` instead.", diff --git a/tencentcloud/resource_tc_cbs_storage_set.go b/tencentcloud/resource_tc_cbs_storage_set.go index 0e9e0354cf..37b4d4b149 100644 --- a/tencentcloud/resource_tc_cbs_storage_set.go +++ b/tencentcloud/resource_tc_cbs_storage_set.go @@ -45,13 +45,12 @@ func resourceTencentCloudCbsStorageSet() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "Type of CBS medium. Valid values: CLOUD_PREMIUM, CLOUD_SSD, CLOUD_TSSD and CLOUD_HSSD.", + Description: "Type of CBS medium. Valid values: CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_BSSD: General Purpose SSD, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD.", }, "storage_size": { - Type: schema.TypeInt, - Required: true, - ValidateFunc: validateIntegerInRange(10, 16000), - Description: "Volume of CBS, and unit is GB. If storage type is `CLOUD_SSD`, the size range is [100, 16000], and the others are [10-16000].", + Type: schema.TypeInt, + Required: true, + Description: "Volume of CBS, and unit is GB.", }, "disk_count": { Type: schema.TypeInt, diff --git a/tencentcloud/resource_tc_ckafka_instance.go b/tencentcloud/resource_tc_ckafka_instance.go index cca9f56f94..9893dcdd87 100644 --- a/tencentcloud/resource_tc_ckafka_instance.go +++ b/tencentcloud/resource_tc_ckafka_instance.go @@ -477,6 +477,7 @@ func resourceTencentCloudCkafkaInstanceRead(d *schema.ResourceData, meta interfa instanceId := d.Id() var info *ckafka.InstanceDetail + var isExist = true err := resource.Retry(readRetryTimeout, func() *resource.RetryError { res, has, e := service.DescribeCkafkaInstanceById(ctx, instanceId) @@ -485,6 +486,7 @@ func resourceTencentCloudCkafkaInstanceRead(d *schema.ResourceData, meta interfa } if !has { d.SetId("") + isExist = false return nil } info = res @@ -493,6 +495,11 @@ func resourceTencentCloudCkafkaInstanceRead(d *schema.ResourceData, meta interfa if err != nil { return fmt.Errorf("[API]Describe kafka instance fail, reason:%s", err.Error()) } + + if !isExist { + return nil + } + _ = d.Set("instance_name", info.InstanceName) _ = d.Set("zone_id", info.ZoneId) // calculate period diff --git a/tencentcloud/resource_tc_instance.go b/tencentcloud/resource_tc_instance.go index 4138c45bb8..ba667515c7 100644 --- a/tencentcloud/resource_tc_instance.go +++ b/tencentcloud/resource_tc_instance.go @@ -337,14 +337,13 @@ func resourceTencentCloudInstance() *schema.Resource { Optional: true, Default: CVM_DISK_TYPE_CLOUD_PREMIUM, ValidateFunc: validateAllowedStringValue(CVM_DISK_TYPE), - Description: "System disk type. For more information on limits of system disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_SSD`: SSD, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_BSSD`: Basic SSD. NOTE: 1. `CLOUD_BASIC`, `LOCAL_BASIC` and `LOCAL_SSD` are deprecated; 2. If modified, the instance may force stop.", + Description: "System disk type. For more information on limits of system disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_SSD`: SSD, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_BSSD`: Basic SSD. NOTE: If modified, the instance may force stop.", }, "system_disk_size": { - Type: schema.TypeInt, - Optional: true, - Default: 50, - ValidateFunc: validateIntegerInRange(50, 1000), - Description: "Size of the system disk. Valid value ranges: (50~1000). and unit is GB. Default is 50GB. If modified, the instance may force stop.", + Type: schema.TypeInt, + Optional: true, + Default: 50, + Description: "Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.", }, "system_disk_id": { Type: schema.TypeString, @@ -365,13 +364,13 @@ func resourceTencentCloudInstance() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "Data disk type. For more information about limits on different data disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_SSD`: SSD, `CLOUD_HSSD`: Enhanced SSD. NOTE: `CLOUD_BASIC`, `LOCAL_BASIC` and `LOCAL_SSD` are deprecated.", + Description: "Data disk type. For more information about limits on different data disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD.", }, "data_disk_size": { Type: schema.TypeInt, Required: true, //ForceNew: true, - Description: "Size of the data disk, and unit is GB. If disk type is `CLOUD_SSD`, the size range is [100, 16000], and the others are [10-16000].", + Description: "Size of the data disk, and unit is GB.", }, "data_disk_snapshot_id": { Type: schema.TypeString, diff --git a/tencentcloud/resource_tc_instance_set.go b/tencentcloud/resource_tc_instance_set.go index e3850e8238..c4cc0f17b1 100644 --- a/tencentcloud/resource_tc_instance_set.go +++ b/tencentcloud/resource_tc_instance_set.go @@ -220,7 +220,7 @@ func resourceTencentCloudInstanceSet() *schema.Resource { Optional: true, Default: CVM_DISK_TYPE_CLOUD_PREMIUM, ValidateFunc: validateAllowedStringValue(CVM_DISK_TYPE), - Description: "System disk type. For more information on limits of system disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_SSD`: SSD, `CLOUD_PREMIUM`: Premium Cloud Storage. NOTE: 1. `CLOUD_BASIC`, `LOCAL_BASIC` and `LOCAL_SSD` are deprecated; 2. If modified, the instance may force stop.", + Description: "System disk type. For more information on limits of system disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_SSD`: SSD, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_BSSD`: Basic SSD. NOTE: If modified, the instance may force stop.", }, "system_disk_size": { Type: schema.TypeInt, diff --git a/website/docs/r/cbs_storage.html.markdown b/website/docs/r/cbs_storage.html.markdown index a64c393c0e..36a9f2baf0 100644 --- a/website/docs/r/cbs_storage.html.markdown +++ b/website/docs/r/cbs_storage.html.markdown @@ -34,8 +34,8 @@ The following arguments are supported: * `availability_zone` - (Required, String, ForceNew) The available zone that the CBS instance locates at. * `storage_name` - (Required, String) Name of CBS. The maximum length can not exceed 60 bytes. -* `storage_size` - (Required, Int) Volume of CBS, and unit is GB. If storage type is `CLOUD_SSD`, the size range is [100, 16000], and the others are [10-16000]. -* `storage_type` - (Required, String, ForceNew) Type of CBS medium. Valid values: CLOUD_PREMIUM, CLOUD_SSD, CLOUD_TSSD and CLOUD_HSSD. +* `storage_size` - (Required, Int) Volume of CBS, and unit is GB. +* `storage_type` - (Required, String, ForceNew) Type of CBS medium. Valid values: CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_BSSD: General Purpose SSD, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD. * `charge_type` - (Optional, String) The charge type of CBS instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. The default is `POSTPAID_BY_HOUR`. * `encrypt` - (Optional, Bool, ForceNew) Indicates whether CBS is encrypted. * `force_delete` - (Optional, Bool) Indicate whether to delete CBS instance directly or not. Default is false. If set true, the instance will be deleted instead of staying recycle bin. diff --git a/website/docs/r/cbs_storage_set.html.markdown b/website/docs/r/cbs_storage_set.html.markdown index 2def307880..7446289e36 100644 --- a/website/docs/r/cbs_storage_set.html.markdown +++ b/website/docs/r/cbs_storage_set.html.markdown @@ -31,8 +31,8 @@ The following arguments are supported: * `availability_zone` - (Required, String, ForceNew) The available zone that the CBS instance locates at. * `storage_name` - (Required, String) Name of CBS. The maximum length can not exceed 60 bytes. -* `storage_size` - (Required, Int) Volume of CBS, and unit is GB. If storage type is `CLOUD_SSD`, the size range is [100, 16000], and the others are [10-16000]. -* `storage_type` - (Required, String, ForceNew) Type of CBS medium. Valid values: CLOUD_PREMIUM, CLOUD_SSD, CLOUD_TSSD and CLOUD_HSSD. +* `storage_size` - (Required, Int) Volume of CBS, and unit is GB. +* `storage_type` - (Required, String, ForceNew) Type of CBS medium. Valid values: CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_BSSD: General Purpose SSD, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD. * `charge_type` - (Optional, String) The charge type of CBS instance. Only support `POSTPAID_BY_HOUR`. * `disk_count` - (Optional, Int, ForceNew) The number of disks to be purchased. Default 1. * `encrypt` - (Optional, Bool, ForceNew) Indicates whether CBS is encrypted. diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index db2cfefebb..dec1d85073 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -173,8 +173,8 @@ The following arguments are supported: * `stopped_mode` - (Optional, String) Billing method of a pay-as-you-go instance after shutdown. Available values: `KEEP_CHARGING`,`STOP_CHARGING`. Default `KEEP_CHARGING`. * `subnet_id` - (Optional, String) The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set. * `system_disk_id` - (Optional, String) System disk snapshot ID used to initialize the system disk. When system disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. -* `system_disk_size` - (Optional, Int) Size of the system disk. Valid value ranges: (50~1000). and unit is GB. Default is 50GB. If modified, the instance may force stop. -* `system_disk_type` - (Optional, String) System disk type. For more information on limits of system disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_SSD`: SSD, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_BSSD`: Basic SSD. NOTE: 1. `CLOUD_BASIC`, `LOCAL_BASIC` and `LOCAL_SSD` are deprecated; 2. If modified, the instance may force stop. +* `system_disk_size` - (Optional, Int) Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop. +* `system_disk_type` - (Optional, String) System disk type. For more information on limits of system disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_SSD`: SSD, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_BSSD`: Basic SSD. NOTE: If modified, the instance may force stop. * `tags` - (Optional, Map) A mapping of tags to assign to the resource. For tag limits, please refer to [Use Limits](https://intl.cloud.tencent.com/document/product/651/13354). * `user_data_raw` - (Optional, String, ForceNew) The user data to be injected into this instance, in plain text. Conflicts with `user_data`. Up to 16 KB after base64 encoded. * `user_data` - (Optional, String, ForceNew) The user data to be injected into this instance. Must be base64 encoded and up to 16 KB. @@ -182,8 +182,8 @@ The following arguments are supported: The `data_disks` object supports the following: -* `data_disk_size` - (Required, Int) Size of the data disk, and unit is GB. If disk type is `CLOUD_SSD`, the size range is [100, 16000], and the others are [10-16000]. -* `data_disk_type` - (Required, String, ForceNew) Data disk type. For more information about limits on different data disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_SSD`: SSD, `CLOUD_HSSD`: Enhanced SSD. NOTE: `CLOUD_BASIC`, `LOCAL_BASIC` and `LOCAL_SSD` are deprecated. +* `data_disk_size` - (Required, Int) Size of the data disk, and unit is GB. +* `data_disk_type` - (Required, String, ForceNew) Data disk type. For more information about limits on different data disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD. * `data_disk_id` - (Optional, String) Data disk ID used to initialize the data disk. When data disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. * `data_disk_snapshot_id` - (Optional, String, ForceNew) Snapshot ID of the data disk. The selected data disk snapshot size must be smaller than the data disk size. * `delete_with_instance` - (Optional, Bool, ForceNew) Decides whether the disk is deleted with instance(only applied to `CLOUD_BASIC`, `CLOUD_SSD` and `CLOUD_PREMIUM` disk with `POSTPAID_BY_HOUR` instance), default is true. diff --git a/website/docs/r/instance_set.html.markdown b/website/docs/r/instance_set.html.markdown index 82f064fac3..be12f03623 100644 --- a/website/docs/r/instance_set.html.markdown +++ b/website/docs/r/instance_set.html.markdown @@ -102,7 +102,7 @@ The following arguments are supported: * `subnet_id` - (Optional, String) The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set. * `system_disk_id` - (Optional, String) System disk snapshot ID used to initialize the system disk. When system disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. * `system_disk_size` - (Optional, Int) Size of the system disk. Valid value ranges: (50~1000). and unit is GB. Default is 50GB. If modified, the instance may force stop. -* `system_disk_type` - (Optional, String) System disk type. For more information on limits of system disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_SSD`: SSD, `CLOUD_PREMIUM`: Premium Cloud Storage. NOTE: 1. `CLOUD_BASIC`, `LOCAL_BASIC` and `LOCAL_SSD` are deprecated; 2. If modified, the instance may force stop. +* `system_disk_type` - (Optional, String) System disk type. For more information on limits of system disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: `LOCAL_BASIC`: local disk, `LOCAL_SSD`: local SSD disk, `CLOUD_SSD`: SSD, `CLOUD_PREMIUM`: Premium Cloud Storage, `CLOUD_BSSD`: Basic SSD. NOTE: If modified, the instance may force stop. * `user_data_raw` - (Optional, String, ForceNew) The user data to be injected into this instance, in plain text. Conflicts with `user_data`. Up to 16 KB after base64 encoded. * `user_data` - (Optional, String, ForceNew) The user data to be injected into this instance. Must be base64 encoded and up to 16 KB. * `vpc_id` - (Optional, String) The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.