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

Cannot run the test in resource_alicloud_elasticsearch_instance #2484

Open chenchen0224 opened 4 years ago

chenchen0224 commented 4 years ago

Terraform Version

Terraform v0.12.8

Affected Resource(s)

Debug Output

--- FAIL: TestAccAlicloudElasticsearchInstance_basic (5.83s)
    testing.go:635: Step 0 error: errors during plan:

        Error: Invalid index

          on /var/folders/5j/1n3yhppj1sl1rmwv0tyqkdh40000gn/T/tf-test307312423/main.tf line 26:
          (source code not available)
            |----------------
            | data.alicloud_vswitches.default.ids is empty list of string

        The given key does not identify an element in this collection value.

    testing.go:696: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during refresh: Invalid index: The given key does not identify an element in this collection value.

        State: <nil>
FAIL
FAIL    github.com/terraform-providers/terraform-provider-alicloud/alicloud 5.909s
FAIL

Steps to Reproduce

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

  1. TF_ACC=1 go test ./alicloud -v -run=TestAccAlicloudElasticsearchInstance_basic -timeout=300m
ljluestc commented 1 year ago
 TF_ACC=1 go test ./alicloud -v -run=TestAccAlicloudElasticsearchInstance_basic -timeout=300m
=== RUN   TestAccAlicloudElasticsearchInstance_basic
    testing.go:635: Step 0 error: errors during refresh:

        Error: Invalid index

          on /tmp/tf-test3260983684/main.tf line 8:
          (source code not available)
            |----------------
            | data.alicloud_vpcs.default.ids is empty list of string

        The given key does not identify an element in this collection value.

--- FAIL: TestAccAlicloudElasticsearchInstance_basic (12.30s)
FAIL
FAIL    github.com/aliyun/terraform-provider-alicloud/alicloud  12.389s
FAIL

reproducible on master as well