Skip to content

Commit 745cfc8

Browse files
committed
add more origin type
1 parent a9be6ad commit 745cfc8

File tree

3 files changed

+43
-10
lines changed

3 files changed

+43
-10
lines changed

tencentcloud/services/cdn/extension_cdn.go

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,24 @@ const (
77
CDN_SERVICE_TYPE_HYBIRD = "hybrid"
88
CDN_SERVICE_TYPE_DYNAMIC = "dynamic"
99

10-
CDN_ORIGIN_TYPE_DOMAIN = "domain"
11-
CDN_ORIGIN_TYPE_COS = "cos"
12-
CDN_ORIGIN_TYPE_IP = "ip"
13-
CDN_ORIGIN_TYPE_IPV6 = "ipv6"
14-
CDN_ORIGIN_TYPE_IP_IPV6 = "ip_ipv6"
10+
CDN_ORIGIN_TYPE_DOMAIN = "domain"
11+
CDN_ORIGIN_TYPE_DOMAIN_V6 = "domainv6"
12+
CDN_ORIGIN_TYPE_COS = "cos"
13+
CDN_ORIGIN_TYPE_THIRD_PARTY = "third_party"
14+
CDN_ORIGIN_TYPE_IGTM = "igtm"
15+
CDN_ORIGIN_TYPE_IP = "ip"
16+
CDN_ORIGIN_TYPE_IPV6 = "ipv6"
17+
CDN_ORIGIN_TYPE_IP_IPV6 = "ip_ipv6"
18+
CDN_ORIGIN_TYPE_IP_DOMAIN = "ip_domain"
19+
CDN_ORIGIN_TYPE_IP_DOMAINV6 = "ip_domainv6"
20+
CDN_ORIGIN_TYPE_IPV6_DOMAIN = "ipv6_domain"
21+
CDN_ORIGIN_TYPE_IPV6_DOMAINV6 = "ipv6_domainv6"
22+
CDN_ORIGIN_TYPE_DOMAIN_DOMAINV6 = "domain_domainv6"
23+
CDN_ORIGIN_TYPE_IP_IPV6_DOMAIN = "ip_ipv6_domain"
24+
CDN_ORIGIN_TYPE_IP_IPV6_DOMAINV6 = "ip_ipv6_domainv6"
25+
CDN_ORIGIN_TYPE_IP_DOMAIN_DOMAINV6 = "ip_domain_domainv6"
26+
CDN_ORIGIN_TYPE_IPV6_DOMAIN_DOMAINV6 = "ipv6_domain_domainv6"
27+
CDN_ORIGIN_TYPE_IP_IPV6_DOMAIN_DOMAINV6 = "ip_ipv6_domain_domainv6"
1528

1629
CDN_ORIGIN_PULL_PROTOCOL_HTTP = "http"
1730
CDN_ORIGIN_PULL_PROTOCOL_HTTPS = "https"
@@ -55,15 +68,31 @@ var CDN_SERVICE_TYPE = []string{
5568

5669
var CDN_ORIGIN_TYPE = []string{
5770
CDN_ORIGIN_TYPE_DOMAIN,
71+
CDN_ORIGIN_TYPE_DOMAIN_V6,
5872
CDN_ORIGIN_TYPE_COS,
73+
CDN_ORIGIN_TYPE_THIRD_PARTY,
74+
CDN_ORIGIN_TYPE_IGTM,
5975
CDN_ORIGIN_TYPE_IP,
6076
CDN_ORIGIN_TYPE_IPV6,
6177
CDN_ORIGIN_TYPE_IP_IPV6,
78+
CDN_ORIGIN_TYPE_IP_DOMAIN,
79+
CDN_ORIGIN_TYPE_IP_DOMAINV6,
80+
CDN_ORIGIN_TYPE_IPV6_DOMAIN,
81+
CDN_ORIGIN_TYPE_IPV6_DOMAINV6,
82+
CDN_ORIGIN_TYPE_DOMAIN_DOMAINV6,
83+
CDN_ORIGIN_TYPE_IP_IPV6_DOMAIN,
84+
CDN_ORIGIN_TYPE_IP_IPV6_DOMAINV6,
85+
CDN_ORIGIN_TYPE_IP_DOMAIN_DOMAINV6,
86+
CDN_ORIGIN_TYPE_IPV6_DOMAIN_DOMAINV6,
87+
CDN_ORIGIN_TYPE_IP_IPV6_DOMAIN_DOMAINV6,
6288
}
6389

6490
var CDN_BACKUP_ORIGIN_TYPE = []string{
65-
CDN_ORIGIN_TYPE_IP,
6691
CDN_ORIGIN_TYPE_DOMAIN,
92+
CDN_ORIGIN_TYPE_IP,
93+
CDN_ORIGIN_TYPE_IPV6_DOMAIN,
94+
CDN_ORIGIN_TYPE_IP_IPV6,
95+
CDN_ORIGIN_TYPE_IP_IPV6_DOMAIN,
6796
}
6897

6998
var CDN_ORIGIN_PULL_PROTOCOL = []string{

tencentcloud/services/cdn/resource_tc_cdn_domain.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ func ResourceTencentCloudCdnDomain() *schema.Resource {
8989
Type: schema.TypeString,
9090
Required: true,
9191
ValidateFunc: tccommon.ValidateAllowedStringValue(CDN_ORIGIN_TYPE),
92-
Description: "Master origin server type. The following types are supported: `domain`: domain name type, `cos`: COS origin, `ip`: IP list used as origin server, `ipv6`: origin server list is a single IPv6 address, `ip_ipv6`: origin server list is multiple IPv4 addresses and an IPv6 address.",
92+
Description: "Master origin server type. The following types are supported: `domain`: Domain name, `domainv6`: IPv6 domain name, `cos`: COS bucket address, `third_party`: Third-party object storage origin, " +
93+
"`igtm`: IGTM origin, `ip`: IP address, `ipv6`: One IPv6 address, `ip_ipv6`: Multiple IPv4 addresses and one IPv6 address, " +
94+
"`ip_domain`: IP addresses and domain names (only available to beta users), `ip_domainv6`: Multiple IPv4 addresses and one IPv6 domain name, `ipv6_domain`: Multiple IPv6 addresses and one domain name, `ipv6_domainv6`: Multiple IPv6 addresses and one IPv6 domain name, " +
95+
"`domain_domainv6`: Multiple IPv4 domain names and one IPv6 domain name, `ip_ipv6_domain`: Multiple IPv4 and IPv6 addresses and one domain name, `ip_ipv6_domainv6`: Multiple IPv4 and IPv6 addresses and one IPv6 domain name, `ip_domain_domainv6`: Multiple IPv4 addresses and IPv4 domain names and one IPv6 domain name, " +
96+
"`ipv6_domain_domainv6`: Multiple IPv4 domain names and IPv6 addresses and one IPv6 domain name, `ip_ipv6_domain_domainv6`: Multiple IPv4 and IPv6 addresses and IPv4 domain names and one IPv6 domain name.",
9397
},
9498
"origin_list": {
9599
Type: schema.TypeList,
@@ -120,7 +124,7 @@ func ResourceTencentCloudCdnDomain() *schema.Resource {
120124
Type: schema.TypeString,
121125
Optional: true,
122126
ValidateFunc: tccommon.ValidateAllowedStringValue(CDN_BACKUP_ORIGIN_TYPE),
123-
Description: "Backup origin server type, which supports the following types: `domain`: domain name type, `ip`: IP list used as origin server.",
127+
Description: "Backup origin server type, which supports the following types: `domain`: domain name type, `ip`: IP list used as origin server, `ipv6_domain`: Multiple IPv6 addresses and one domain name, `ip_ipv6`: Multiple IPv4 addresses and one IPv6 address, `ip_ipv6_domain`: Multiple IPv4 and IPv6 addresses and one domain name.",
124128
},
125129
"backup_origin_list": {
126130
Type: schema.TypeList,

website/docs/r/cdn_domain.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,9 @@ The `origin_pull_timeout` object supports the following:
356356
The `origin` object supports the following:
357357

358358
* `origin_list` - (Required, List) Master origin server list. Valid values can be ip or domain name. When modifying the origin server, you need to enter the corresponding `origin_type`.
359-
* `origin_type` - (Required, String) Master origin server type. The following types are supported: `domain`: domain name type, `cos`: COS origin, `ip`: IP list used as origin server, `ipv6`: origin server list is a single IPv6 address, `ip_ipv6`: origin server list is multiple IPv4 addresses and an IPv6 address.
359+
* `origin_type` - (Required, String) Master origin server type. The following types are supported: `domain`: Domain name, `domainv6`: IPv6 domain name, `cos`: COS bucket address, `third_party`: Third-party object storage origin, `igtm`: IGTM origin, `ip`: IP address, `ipv6`: One IPv6 address, `ip_ipv6`: Multiple IPv4 addresses and one IPv6 address, `ip_domain`: IP addresses and domain names (only available to beta users), `ip_domainv6`: Multiple IPv4 addresses and one IPv6 domain name, `ipv6_domain`: Multiple IPv6 addresses and one domain name, `ipv6_domainv6`: Multiple IPv6 addresses and one IPv6 domain name, `domain_domainv6`: Multiple IPv4 domain names and one IPv6 domain name, `ip_ipv6_domain`: Multiple IPv4 and IPv6 addresses and one domain name, `ip_ipv6_domainv6`: Multiple IPv4 and IPv6 addresses and one IPv6 domain name, `ip_domain_domainv6`: Multiple IPv4 addresses and IPv4 domain names and one IPv6 domain name, `ipv6_domain_domainv6`: Multiple IPv4 domain names and IPv6 addresses and one IPv6 domain name, `ip_ipv6_domain_domainv6`: Multiple IPv4 and IPv6 addresses and IPv4 domain names and one IPv6 domain name.
360360
* `backup_origin_list` - (Optional, List) Backup origin server list. Valid values can be ip or domain name. When modifying the backup origin server, you need to enter the corresponding `backup_origin_type`.
361-
* `backup_origin_type` - (Optional, String) Backup origin server type, which supports the following types: `domain`: domain name type, `ip`: IP list used as origin server.
361+
* `backup_origin_type` - (Optional, String) Backup origin server type, which supports the following types: `domain`: domain name type, `ip`: IP list used as origin server, `ipv6_domain`: Multiple IPv6 addresses and one domain name, `ip_ipv6`: Multiple IPv4 addresses and one IPv6 address, `ip_ipv6_domain`: Multiple IPv4 and IPv6 addresses and one domain name.
362362
* `backup_server_name` - (Optional, String) Host header used when accessing the backup origin server. If left empty, the ServerName of master origin server will be used by default.
363363
* `cos_private_access` - (Optional, String) When OriginType is COS, you can specify if access to private buckets is allowed. Valid values are `on` and `off`. and default value is `off`.
364364
* `origin_pull_protocol` - (Optional, String) Origin-pull protocol configuration. `http`: forced HTTP origin-pull, `follow`: protocol follow origin-pull, `https`: forced HTTPS origin-pull. This only supports origin server port 443 for origin-pull.

0 commit comments

Comments
 (0)