aliyun / terraform-provider-alicloud

Terraform AliCloud provider
https://www.terraform.io/docs/providers/alicloud/
Mozilla Public License 2.0
589 stars 554 forks source link

Failed to create aliyun MongoDb because of no such host dds.cn-guangzhou.aliyuncs.com #3949

Open shangfu-peng opened 3 years ago

shangfu-peng commented 3 years ago

Terraform Version

Terraform v1.0.1 on linux_amd64

I also tried the latest version.

Affected Resource(s)

Please list the resources as a list:

Terraform Configuration Files

provider "alicloud" {
  configuration_source = "terraform-provider-alicloud/examples/vpc"
}

resource "alicloud_vpc" "main" {
  vpc_name       = "alicloud"
  cidr_block = "10.1.0.0/21"
}

resource "alicloud_vswitch" "main" {
  vpc_id            = alicloud_vpc.main.id
  cidr_block        = "10.1.0.0/24"
  zone_id = "cn-guangzhou-a"
  depends_on = [alicloud_vpc.main]
}

resource "alicloud_mongodb_instance" "example" {
  engine_version      = "4.2"
  db_instance_class   = "dds.mongo.mid"
  db_instance_storage = 10
  vswitch_id          = alicloud_vswitch.main.id
}

Debug Output

│ Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_instance.go:259: Resource alicloud_mongodb_instance CreateDBInstance Failed!!! [SDK alibaba-cloud-sdk-go ERROR]: │ Post "https://dds.cn-guangzhou.aliyuncs.com/?XXXXX: dial tcp: lookup dds.cn-guangzhou.aliyuncs.com on 127.0.1.1:53: no such host

I also searched the "dds.cn-guangzhou.aliyuncs.com“. One possible issue is that based on the aliyun developer page, https://developer.aliyun.com/endpoints, it might be mongodb.cn-guangzhou.aliyuncs.com instead of dds.xxx?

I also tried "nslookup dds.cn-guangzhou.aliyuncs.com". It shows "server can't find dds.cn-guangzhou.aliyuncs.com: NXDOMAIN"

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

It is expected to create a vpc, a vswitch, and a mongodb instance.

Actual Behavior

What actually happened? It created a vpc and a vswitch, but failed to create the mongodb instance.

│ Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_mongodb_instance.go:259: Resource alicloud_mongodb_instance CreateDBInstance Failed!!! [SDK alibaba-cloud-sdk-go ERROR]: │ Post "https://dds.cn-guangzhou.aliyuncs.com/?XXXXX: dial tcp: lookup dds.cn-guangzhou.aliyuncs.com on 127.0.1.1:53: no such host

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

ankyit commented 1 year ago

Any updates on this issue