alicloud_ga_domains
更新时间:
This data source provides Ga Domain available to the user.What is Domain
-> NOTE: Available in 1.197.0+
Example Usage
data "alicloud_ga_accelerators" "default" {
status = "active"
}
resource "alicloud_ga_accelerator" "default" {
count = length(data.alicloud_ga_accelerators.default.accelerators) > 0 ? 0 : 1
duration = 1
auto_use_coupon = true
spec = "1"
}
locals {
accelerator_id = length(data.alicloud_ga_accelerators.default.accelerators) > 0 ? data.alicloud_ga_accelerators.default.accelerators.0.id : alicloud_ga_accelerator.default.0.id
}
data "alicloud_ga_domains" "default" {
accelerator_id = locals.accelerator_id
domain = "your_domain"
}
output "alicloud_ga_domain_example_id" {
value = data.alicloud_ga_domains.default.domains.0.id
}
Argument Reference
The following arguments are supported:
ids
- (Optional, ForceNew, Computed) A list of Ga Domain IDs.accelerator_id
- (ForceNew,Optional) The ID of the global acceleration instance.domain
- (ForceNew,Optional) The accelerated domain name to be added. only top-level domain names are supported, such as 'example.com'.status
- (ForceNew,Optional) The status of the resource. Valid values:illegal
,inactive
,active
,unknown
.output_file
- (Optional) File name where to save data source results (after runningterraform plan
).
Attributes Reference
The following attributes are exported in addition to the arguments listed above:
domains
- A list of Domain Entries. Each element contains the following attributes:id
- The ID of the Ga Domain.accelerator_id
- The ID of the global acceleration instance.domain
- The accelerated domain name to be added.status
- The status of the resource
文档内容是否对您有帮助?