Skip to content

Commit 7dedc33

Browse files
committed
fix cos bucket name validator
1 parent 361406e commit 7dedc33

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
## 1.49.2 (Unreleased)
2+
3+
BUG FIXES:
4+
5+
* Resource: `tencentcloud_cos_bucket` fix bucket name validator.
6+
27
## 1.49.1 (December 01, 2020)
38

49
ENHANCEMENTS:

tencentcloud/resource_tc_instance.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,8 @@ func resourceTencentCloudInstanceCreate(d *schema.ResourceData, meta interface{}
614614
if errRet != nil {
615615
return retryError(errRet, InternalError)
616616
}
617-
if instance != nil && *instance.InstanceState == CVM_STATUS_RUNNING {
617+
if instance != nil && (*instance.InstanceState == CVM_STATUS_RUNNING ||
618+
*instance.InstanceState == CVM_STATUS_LAUNCH_FAILED) {
618619
return nil
619620
}
620621
return resource.RetryableError(fmt.Errorf("cvm instance status is %s, retry...", *instance.InstanceState))

tencentcloud/validators.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ func validateAllowedIntValue(ints []int) schema.SchemaValidateFunc {
225225
}
226226
}
227227

228-
// Only support lowercase letters, numbers and "-". It cannot be longer than 40 characters.
228+
// Only support lowercase letters, numbers and "-". It cannot be longer than 60 characters.
229229
func validateCosBucketName(v interface{}, k string) (ws []string, errors []error) {
230230
value := v.(string)
231-
if len(value) > 40 || len(value) < 0 {
232-
errors = append(errors, fmt.Errorf("the length of %s must be 1-40: %s", k, value))
231+
if len(value) > 60 || len(value) < 0 {
232+
errors = append(errors, fmt.Errorf("the length of %s must be 1-60: %s", k, value))
233233
}
234234

235235
pattern := `^[a-z0-9-]+$`

website/docs/r/cdn_domain.html.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ The `client_certificate_config` object supports the following:
9999

100100
The `force_redirect` object supports the following:
101101

102-
* `redirect_status_code` - (Optional) Access forced jump code. Valid values are `301` and `302`. When `switch` setting `off`, this property does not need to be set or set to `302`. Default value is `302`.
103-
* `redirect_type` - (Optional) Access forced jump type. Valid values are `http` and `https`. `http` means force http redirect, `https` means force http redirect. When `switch` setting `off`, this property does not need to be set or set to `http`. Default value is `http`.
104-
* `switch` - (Optional) Access forced jump configuration switch. Valid values are `on` and `off`. Default value is `off`.
102+
* `redirect_status_code` - (Optional) Forced redirect status code. Valid values are `301` and `302`. When `switch` setting `off`, this property does not need to be set or set to `302`. Default value is `302`.
103+
* `redirect_type` - (Optional) Forced redirect type. Valid values are `http` and `https`. `http` means a forced redirect from HTTPS to HTTP, `https` means a forced redirect from HTTP to HTTPS. When `switch` setting `off`, this property does not need to be set or set to `http`. Default value is `http`.
104+
* `switch` - (Optional) Forced redirect configuration switch. Valid values are `on` and `off`. Default value is `off`.
105105

106106
The `https_config` object supports the following:
107107

108108
* `https_switch` - (Required) HTTPS configuration switch. Valid values are `on` and `off`.
109109
* `client_certificate_config` - (Optional) Client certificate configuration information.
110-
* `force_redirect` - (Optional) Access protocol mandatory jump configuration. It's a list and consist of at most one item.
110+
* `force_redirect` - (Optional) Configuration of forced HTTP or HTTPS redirects.
111111
* `http2_switch` - (Optional) HTTP2 configuration switch. Valid values are `on` and `off`. and default value is `off`.
112112
* `ocsp_stapling_switch` - (Optional) OCSP configuration switch. Valid values are `on` and `off`. and default value is `off`.
113113
* `server_certificate_config` - (Optional) Server certificate configuration information.

0 commit comments

Comments
 (0)