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

Fields values are missing when importing volume #916

Closed
alexandrovas opened this issue Feb 11, 2021 · 1 comment · Fixed by #919
Closed

Fields values are missing when importing volume #916

alexandrovas opened this issue Feb 11, 2021 · 1 comment · Fixed by #919
Milestone

Comments

@alexandrovas
Copy link

alexandrovas commented Feb 11, 2021

I imported resource huaweicloud_evs_volume, but some fields were not imported. Therefore terraform wants to recreate these resources.
Imported resource:

{
          "index_key": 0,
          "schema_version": 0,
          "attributes": {
            "attachment": [
              {
                "device": "/dev/vdb",
                "id": "56ddb3be-baa9-4719-8d56-d6e48fdacd0e",
                "instance_id": "61446aa2-512b-441b-b9c5-e53289bf9c67"
              }
            ],
            "availability_zone": "ru-moscow-1a",
            "backup_id": null,
            "cascade": null,
            "description": "",
            "device_type": null,
            "id": "56ddb3be-baa9-4719-8d56-d6e48fdacd0e",
            "image_id": null,
            "kms_id": null,
            "multiattach": null,
            "name": "sp2-zkp--0001-volume-0001",
            "region": null,
            "size": 36,
            "snapshot_id": "",
            "tags": {},
            "timeouts": {
              "create": null,
              "delete": null,
              "update": null
            },
            "volume_type": "SSD",
            "wwn": ""
          },
          "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTgwMDAwMDAwMDAwLCJ1cGRhdGUiOjE4MDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMCJ9"
        }

Terraform created resources:

...
"cascade": false,
"device_type": "VBD",
"multiattach": false,
...

Expected:
Fields should be imported to terraform state.

@alexandrovas alexandrovas changed the title Fields are missing when importing volume Fields values are missing when importing volume Feb 11, 2021
@ShiChangkuo ShiChangkuo added this to the v1.22.0 milestone Feb 20, 2021
@ShiChangkuo
Copy link
Collaborator

@alexandrovas the missing parameters except cascade are added by #919,
As the cascade is only used for destroying, we can not get the value from API response. It is generally recommended running terraform plan after importing an disk or ignore the changes.

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