I am importing aws_backup_selection resource but I receive an error:
Error: unexpected format of ID ("56XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"), expected <plan-id>|<selection-id>
I am importing the resource with the following command:
terraform import aws_backup_selection.my_backup_selection 56XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX|1eXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
According to the official documentation this is how you import this kind of records:
$ terraform import aws_backup_selection.example plan-id|selection-id
The plan-id and selection-id provided values are correct.
I am not sure what I am doing wrong, I am following the guide. I even tried something like this which I know makes no sense.
terraform import aws_backup_selection.my_backup_selection 56XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | 1eXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
terraform import aws_backup_selection.my_backup_selection <56XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX>|<1eXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX>
terraform import aws_backup_selection.my_backup_selection "56XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"|"1eXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
terraform import "name_of_object" name_of_resource like this
to get "name_of_object" you can run terraform plan and find it. Do no forget "" everywhere and check roles. Make sure that role that you use has correct assume settings. see screenshot