You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Invalid resource type
on ../../modules/huaweicloud-cdn-domain/main.tf line 2, in resource "huaweicloud_cdn_domain_v1" "this":
2: resource "huaweicloud_cdn_domain_v1" "this" {
The provider provider.huaweicloud does not support resource type
"huaweicloud_cdn_domain_v1".
Terraform v0.12.24
provider.huaweicloud v1.14.0
main.tf
module "cdn" {
source ="../../modules/huaweicloud-cdn-domain"
name = var. name
type = var.type
sources = var.sources
}
variables.tf
variable "huaweicloud_access_key" {
}
variable "huaweicloud_secret_key" {
}
variable "name" {
description = "The acceleration domain name. Changing this parameter will create a new resource."
default = "www.steptomoney.cn"
}
variable "type" {
description = "The service type. The valid values are 'web', 'download' and 'video'. Changing this parameter will create a new resource."
default = "web"
}
variable "sources" {
# origin - (Required) The domain name or IP address of the origin server.
# origin_type - (Required) The origin server type. The valid values are 'ipaddr', 'domain', and 'obs_bucket'.
# active - (Optional) Whether an origin server is active or standby (1: active; 0: standby). The default value is 1.
description = "An array of one or more objects specifies the domain name of the origin server."
default = [
{
"origin": "api.steptomoney.cn",
"origin_type": "domain",
"active": 1
}
]
}
../../modules/huaweicloud-cdn-domain/main.tf
# Create CDN
resource "huaweicloud_cdn_domain_v1" "this" {
name = var.name
type = var.type
sources {
origin = var.sources[0]["origin"]
origin_type = var.sources[0]["origin_type"]
active = var.sources[0]["active"]
}
}
If ../../modules/huaweicloud-cdn-domain/main.tf was configured like this, it will crash.
Terraform v0.12.24
provider.huaweicloud v1.14.0
main.tf
variables.tf
../../modules/huaweicloud-cdn-domain/main.tf
If
../../modules/huaweicloud-cdn-domain/main.tf
was configured like this, it will crash.crash.log
The text was updated successfully, but these errors were encountered: