We are experiencing the same issue which has been already opened as a bug
We have the below use case.
We have one of the existing state file where we are trying to import the AWS ACM Certificate resources to the new state file
We are using the inbuilt terraform runner role which is using the terraform import module and they are wrapped under the Ansible Workflow for execution
The Import is happening and the resources are getting imported to the new state file and there are no errors
The problem is in the resources section of new state file which was imported is not consistent with the original data which is present
There Comes the Problem:
When the ACM certificates resources are imported from 1 state file to another state file, the resource data is not fully imported
Index / Certificate Body / Certificate Chain / private Key are missing on the new state file where the resource was imported by terraform import
The above Problem is causing terraform to remove the original certificates on the AWS ACM and it is trying to recreate the certs again as the Imported state file configuration is not matching with the original resource that is available on AWS ACM
Manual Work around:
We tried to modify the state file manually to populate all the required values that are missing
Executed terraform apply and the deletion and recreation did not happen and it skipped as the state file configuration and the original resource on AWS ACM is matching
Kindly need your assistance on the same how to achieve it programmatically via terraform import.