Importing a non existing resource (eg: the API return a 404) results into the import command succeeding instead of throwing an error.
To Reproduce
A clear and concise description on how does it work now and what's the current behaviour.
Steps to reproduce the behaviour:
Execute terraform import with a non existing ID terraform import openapi_group_v1.my_iam_group_v1 non_existing_group
openapi_group_v1.my_iam_group_v1: Importing from ID "non_existing_group"...
openapi_group_v1.my_iam_group_v1: Import prepared!
Prepared openapi_group_v1 for import
openapi_group_v1.my_iam_group_v1: Refreshing state... [id=non_existing_group]
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.
Expected behaviour
As a OpenAPI Terraform userI want the terraform import command to fail and return an error when the imported resource does not exists (eg: the API returns 404)
So that I can figure out what the issue is and fix it if needed (eg: typo in the resourceID imported)
An error should be thrown stating the error and terraform import should fail
Example:
Scenario: Importing a non existing resource errors out
Given a non existing resource
When executing the import command: terraform import openapi_group_v1.my_iam_group_v1 non_existing_group
Then the plugin should return a user friendly error containing the details of the problem and terraform should error out
Additional context
Add any other context about the problem here.
Checklist (for admin only)
Don't forget to go through the checklist to make sure the issue is created properly:
[x] I have added a corresponding label (bug) to the issue (right side menu)
[x] I have added this issue to the 'API Terraform Provider' GitHub project (right side menu)
Describe the bug
Importing a non existing resource (eg: the API return a 404) results into the import command succeeding instead of throwing an error.
To Reproduce
A clear and concise description on how does it work now and what's the current behaviour.
Steps to reproduce the behaviour:
terraform import openapi_group_v1.my_iam_group_v1 non_existing_group
Expected behaviour
As a OpenAPI Terraform user I want the terraform import command to fail and return an error when the imported resource does not exists (eg: the API returns 404) So that I can figure out what the issue is and fix it if needed (eg: typo in the resourceID imported) An error should be thrown stating the error and terraform import should fail
Example:
Additional context
Add any other context about the problem here.
Checklist (for admin only)
Don't forget to go through the checklist to make sure the issue is created properly: