alicloud_dcdn_er
更新时间:
Provides a DCDN Er resource.
For information about DCDN Er and how to use it, see What is Er.
-> NOTE: Available since v1.201.0.
Example Usage
Basic Usage
variable "name" {
default = "tf-example"
}
resource "alicloud_dcdn_er" "default" {
er_name = var.name
description = var.name
env_conf {
staging {
spec_name = "5ms"
allowed_hosts = ["example.com"]
}
production {
spec_name = "5ms"
allowed_hosts = ["example.com"]
}
}
}
Argument Reference
The following arguments are supported:
er_name- (Required, ForceNew) The name of the routine. The name must be unique among the routines that belong to the same Alibaba Cloud account.description- (Optional) Routine The description of the routine.env_conf- (Optional) The configurations of the specified environment. Seeenv_confbelow.
env_conf
The env_conf supports the following:
staging- (Optional) The configuration of a staging environment. Seestagingbelow.production- (Optional) The configuration of a production environment. Seestagingbelow.preset_canary_anhui- (Optional) The configuration of a presetCanaryAnhui environment. Seestagingbelow.preset_canary_beijing- (Optional) The configuration of a presetCanaryBeijing environment. Seestagingbelow.preset_canary_chongqing- (Optional) The configuration of a presetCanaryChongqing environment. Seestagingbelow.preset_canary_fujian- (Optional) The configuration of a presetCanaryFujian environment. Seestagingbelow.preset_canary_gansu- (Optional) The configuration of a presetCanaryGansu environment. Seestagingbelow.preset_canary_guangdong- (Optional) The configuration of a presetCanaryGuangdong environment. Seestagingbelow.preset_canary_guangxi- (Optional) The configuration of a presetCanaryGuangxi environment. Seestagingbelow.preset_canary_guizhou- (Optional) The configuration of a presetCanaryGuizhou environment. Seestagingbelow.preset_canary_hainan- (Optional) The configuration of a presetCanaryHainan environment. Seestagingbelow.preset_canary_hebei- (Optional) The configuration of a presetCanaryHebei environment. Seestagingbelow.preset_canary_heilongjiang- (Optional) The configuration of a presetCanaryHeilongjiang environment. Seestagingbelow.preset_canary_henan- (Optional) The configuration of a presetCanaryHenan environment. Seestagingbelow.preset_canary_hong_kong- (Optional) The configuration of a presetCanaryHongKong environment. Seestagingbelow.preset_canary_hubei- (Optional) The configuration of a presetCanaryHubei environment. Seestagingbelow.preset_canary_hunan- (Optional) The configuration of a presetCanaryHunan environment. Seestagingbelow.preset_canary_jiangsu- (Optional) The configuration of a presetCanaryJiangsu environment. Seestagingbelow.preset_canary_jiangxi- (Optional) The configuration of a presetCanaryJiangxi environment. Seestagingbelow.preset_canary_jilin- (Optional) The configuration of a presetCanaryJilin environment. Seestagingbelow.preset_canary_liaoning- (Optional) The configuration of a presetCanaryLiaoning environment. Seestagingbelow.preset_canary_macau- (Optional) The configuration of a presetCanaryMacau environment. Seestagingbelow.preset_canary_neimenggu- (Optional) The configuration of a presetCanaryNeimenggu environment. Seestagingbelow.preset_canary_ningxia- (Optional) The configuration of a presetCanaryNingxia environment. Seestagingbelow.preset_canary_qinghai- (Optional) The configuration of a presetCanaryQinghai environment. Seestagingbelow.preset_canary_shaanxi- (Optional) The configuration of a presetCanaryShaanxi environment. Seestagingbelow.preset_canary_shandong- (Optional) The configuration of a presetCanaryShandong environment. Seestagingbelow.preset_canary_shanghai- (Optional) The configuration of a presetCanaryShanghai environment. Seestagingbelow.preset_canary_shanxi- (Optional) The configuration of a presetCanaryShanxi environment. Seestagingbelow.preset_canary_sichuan- (Optional) The configuration of a presetCanarySichuan environment. Seestagingbelow.preset_canary_taiwan- (Optional) The configuration of a presetCanaryTaiwan environment. Seestagingbelow.preset_canary_tianjin- (Optional) The configuration of a presetCanaryTianjin environment. Seestagingbelow.preset_canary_xinjiang- (Optional) The configuration of a presetCanaryXinjiang environment. Seestagingbelow.preset_canary_xizang- (Optional) The configuration of a presetCanaryXizang environment. Seestagingbelow.preset_canary_yunnan- (Optional) The configuration of a presetCanaryYunnan environment. Seestagingbelow.preset_canary_zhejiang- (Optional) The configuration of a presetCanaryZhejiang environment. Seestagingbelow.preset_canary_overseas- (Optional) The configuration of a presetCanaryOverseas environment. Seestagingbelow.
env_conf-staging
The staging supports the following:
spec_name- (Optional) The specification of the CPU time slice. Valid values:5ms,50ms,100ms.code_rev- (Optional) The version number of the code.allowed_hosts- (Optional) Allowed DCDN domain names.
Attributes Reference
The following attributes are exported:
id- The resource ID in terraform of Er.
Timeouts
The timeouts block allows you to specify timeouts for certain actions:
create- (Defaults to 5 mins) Used when create the Er.update- (Defaults to 5 mins) Used when update the Er.delete- (Defaults to 5 mins) Used when delete the Er.
Import
DCDN Er can be imported using the id, e.g.
$ terraform import alicloud_dcdn_er.example <id>
该文章对您有帮助吗?