aliyun / terraform-provider-alicloud

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

[Bug] alicloud_cas_certificate not work #2278

Open liuyangc3 opened 4 years ago

liuyangc3 commented 4 years ago

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Terraform v0.12.23
+ provider.alicloud v1.71.2

Affected Resource(s)

Please list the resources as a list, for example:

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "alicloud_cas_certificate" "cert" {
  provider = alicloud.cn-huhehaote
  name = "test"
  cert = file("${path.module}/tls.crt")
  key  = file("${path.module}/tls.key")
 }

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_cas_certificate.go:66:
[SDK.CanNotResolveEndpoint] Can not resolve endpoint(param = {"Domain":"","Product":"cas","RegionId":"cn-huhehaote","LocationProduct":"cas","LocationEndpointType":"openAPI"}), please check your accessKey with secret, and read the user guide

caused by:
SDK.ServerError
ErrorCode: InvalidRegionId
Recommend:
RequestId: 872365C8-D0B6-43B5-B056-78DFE7600936
Message: The specified region does not exist.

Panic Output

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

Expected Behavior

Create resource

Actual Behavior

Got error

Steps to Reproduce

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

  1. terraform apply
ljluestc commented 11 months ago
provider "alicloud" {
  alias  = "cn-huhehaote"
  region = "cn-huhehaote"
  # Add your other provider configuration options here
}

resource "alicloud_cas_certificate" "cert" {
  provider = alicloud.cn-huhehaote
  name     = "test"
  cert     = file("${path.module}/tls.crt")
  key      = file("${path.module}/tls.key")
}

# Define other resources and configurations as needed