Skip to content

Commit 11f4b44

Browse files
committed
fix(cdn): [119927677] support origin_company field and add computed to the message field
1 parent c888c69 commit 11f4b44

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tencentcloud/services/cdn/resource_tc_cdn_domain.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func ResourceTencentCloudCdnDomain() *schema.Resource {
4141
"cache_key": []interface{}{map[string]interface{}{
4242
"full_url_cache": "on",
4343
}},
44+
"full_url_cache": true,
4445
}),
4546
},
4647

@@ -137,6 +138,11 @@ func ResourceTencentCloudCdnDomain() *schema.Resource {
137138
Optional: true,
138139
Description: "Host header used when accessing the backup origin server. If left empty, the ServerName of master origin server will be used by default.",
139140
},
141+
"origin_company": {
142+
Type: schema.TypeString,
143+
Optional: true,
144+
Description: "Object storage back to the source vendor. Required when the source station type is a third-party storage source station (third_party). Optional values ​​include the following: `aws_s3`: AWS S3; `ali_oss`: Alibaba Cloud OSS; `hw_obs`: Huawei OBS; `qiniu_kodo`: Qiniu Cloud kodo; `others`: other vendors' object storage, only supports object storage compatible with AWS signature algorithm, such as Tencent Cloud Financial Zone COS. Example value: `hw-oss`.",
145+
},
140146
},
141147
},
142148
},
@@ -212,6 +218,7 @@ func ResourceTencentCloudCdnDomain() *schema.Resource {
212218
"message": {
213219
Type: schema.TypeString,
214220
Optional: true,
221+
Computed: true,
215222
Description: "Certificate remarks.",
216223
},
217224
"deploy_time": {
@@ -1861,6 +1868,9 @@ func resourceTencentCloudCdnDomainCreate(d *schema.ResourceData, meta interface{
18611868
request.Origin.BackupOrigins = append(request.Origin.BackupOrigins, helper.String(item.(string)))
18621869
}
18631870
}
1871+
if v := origin["origin_company"]; v.(string) != "" {
1872+
request.Origin.OriginCompany = helper.String(v.(string))
1873+
}
18641874

18651875
// https config
18661876
if v, ok := d.GetOk("https_config"); ok {
@@ -2564,6 +2574,7 @@ func resourceTencentCloudCdnDomainRead(d *schema.ResourceData, meta interface{})
25642574
origin["backup_origin_type"] = domainConfig.Origin.BackupOriginType
25652575
origin["backup_origin_list"] = domainConfig.Origin.BackupOrigins
25662576
origin["backup_server_name"] = domainConfig.Origin.BackupServerName
2577+
origin["origin_company"] = domainConfig.Origin.OriginCompany
25672578
origins = append(origins, origin)
25682579
_ = d.Set("origin", origins)
25692580

@@ -3178,6 +3189,9 @@ func resourceTencentCloudCdnDomainUpdate(d *schema.ResourceData, meta interface{
31783189
request.Origin.BackupOrigins = append(request.Origin.BackupOrigins, helper.String(item.(string)))
31793190
}
31803191
}
3192+
if v := origin["origin_company"]; v.(string) != "" {
3193+
request.Origin.OriginCompany = helper.String(v.(string))
3194+
}
31813195
}
31823196
if d.HasChange("request_header") {
31833197
updateAttrs = append(updateAttrs, "request_header")

0 commit comments

Comments
 (0)