Im using Terraform to integrate my AWS account, which has several environments, to a third party monitoring service, called Datadog, for this i have the AWS and Datadog providers, respectively, set up in terraform based in this documentation: Terraform Registry.
All is good, and I have been able to create the resources successfully in one of my workspaces.
The problem here is that, when i try to import a resource to the other workspaces, i get the error message:
│ Error: nil entry in ImportState results. This is always a bug with
│ the resource that is being imported. Please report this as
│ a bug to Terraform.
│
the resource that im trying to import is:
resource “datadog_integration_aws” “sandbox” {
account_id = local.envVar.AWS_ACCOUNTID
role_name = “DatadogAWSIntegrationRole”
}
Im trying to import it based in this documentation :
https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/integration_aws#import
Using the command:
EXTERNAL_ID=cedc…40b terraform import datadog_integration_aws.sandbox 15…12:DatadogIntegrationRole
Being those my EXTERNAL_ID and AWS Account ID, respectively, and I have already verified this information, it is correct.
I have tried it all, searching, destroying and re-creating, The Hashicorp Community, deploying it in several ways, including contacting the Datadog team, they are helping me with that they are able to. However, I think this is something more related to terraform that Datadog, Since i am not able to import it.
Please help me as fast as you can.