Generating configuration from remote state is still not officially supported by Terraform.
However, when I stupidly enough deleted a complex DataDog resource that I had created manually, I managed to fully restore it and create a full terraform file for it using a few simple commands
This worked for me with the datadog_synthetics_test
resource, so this will be the example resource below.
If this works for you with any other Terraform resources, I would love to know 🤗 .