Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.232.0 try to reach unexisting host mongodb.cn-shanghai.aliyuncs.com for alicloud_mongodb_instances resources #7792

Open
mick1627 opened this issue Oct 29, 2024 · 1 comment

Comments

@mick1627
Copy link

Terraform Version

Terraform v1.5.4

Affected Resource(s)

  • alicloud_mongodb_instances

Terraform Configuration Files

data "alicloud_mongodb_instances" "this" {
  ids = var.existing_instance_id != "" ? [var.existing_instance_id] : null
}

Output

Error: �[31m[ERROR]�[0m terraform-provider-alicloud/alicloud/data_source_alicloud_mongodb_instances.go:233: Datasource alicloud_mongodb_instances DescribeDBInstances Failed!!! [SDK alibaba-cloud-sdk-go ERROR]: Post "https://mongodb.cn-shanghai.aliyuncs.com/?

Actual Behavior

terraform try to do a call to https://mongodb.cn-shanghai.aliyuncs.com/ but mongodb.cn-shanghai.aliyuncs.com does not exist.
It should use mongodb.aliyuncs.com or mongodb-vpc.cn-shanghai.aliyuncs.com

workaround

terraform {
  required_version = ">= 0.13"
  required_providers {
    alicloud = {
      source  = "aliyun/alicloud"
      version = "!=1.232.0"
    }
  }  
}
@xiaozhu36
Copy link
Member

xiaozhu36 commented Jan 3, 2025

HI @mick1627 I am sorry for late reply. This issue has been fixed in v1.240.0. Please upgrade it and have a try.

In addition, if you don't want to upgrade, you can set mongodb endpoint explicitly in the provider as follows to avoid it:

provider "alicloud" {
    endpoints = {
        dds = "mongodb.aliyuncs.com"
   }
}

Please let me know if you have more issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants