File tree Expand file tree Collapse file tree 3 files changed +64
-0
lines changed
quickstarts/DCDN/101-use-case-configure-dcdn-domain-name Expand file tree Collapse file tree 3 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ <!-- BEGIN_TF_DOCS -->
2+ ## Providers
3+
4+ | Name | Version |
5+ | ------| ---------|
6+ | <a name =" provider_alicloud " ></a > [ alicloud] ( #provider\_ alicloud ) | n/a |
7+ | <a name =" provider_random " ></a > [ random] ( #provider\_ random ) | n/a |
8+
9+ ## Modules
10+
11+ No modules.
12+
13+ ## Resources
14+
15+ | Name | Type |
16+ | ------| ------|
17+ | [ alicloud_dcdn_domain.domain] ( https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/dcdn_domain ) | resource |
18+ | [ alicloud_dcdn_domain_config.config-ip] ( https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/dcdn_domain_config ) | resource |
19+ | [ random_integer.default] ( https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer ) | resource |
20+
21+ ## Inputs
22+
23+ No inputs.
24+ <!-- END_TF_DOCS -->
25+ ## Documentation
26+ <!-- docs-link -->
27+
28+ The template is based on Aliyun document: [ Configure DCDN domain name] ( http://help.aliyun.com/document_detail/434131.htm )
29+
30+ <!-- docs-link -->
Original file line number Diff line number Diff line change 1+ resource "random_integer" "default" {
2+ min = 10000
3+ max = 99999
4+ }
5+
6+ # 添加一个加速域名
7+ resource "alicloud_dcdn_domain" "domain" {
8+ domain_name = " mydcdndomain-${ random_integer . default . result } .alicloud-provider.cn"
9+ scope = " overseas"
10+ sources {
11+ content = " myoss-${ random_integer . default . result } .oss-rg-china-mainland.aliyuncs.com"
12+ type = " oss"
13+ priority = " 20"
14+ port = 80
15+ weight = " 15"
16+ }
17+ }
18+
19+ // # 为加速域名配置访问IP白名单
20+ resource "alicloud_dcdn_domain_config" "config-ip" {
21+ domain_name = alicloud_dcdn_domain. domain . domain_name
22+ function_name = " ip_allow_list_set"
23+ function_args {
24+ arg_name = " ip_list"
25+ arg_value = " 192.168.0.1"
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ terraform {
2+ required_providers {
3+ alicloud = {
4+ source = " aliyun/alicloud"
5+ }
6+ }
7+ }
You can’t perform that action at this time.
0 commit comments