Terraform import says "import successful" but it wasn’t

I have several thousand resources to import from azure into remote state. Using powershell to get the resource parameters, I'm using the following line in a script to import the resource:

terraform import azurerm_resource_group.$($ResourceGroupName) "$($ResourceGroup.ResourceID)" 

The output says "Import successful. The resources there were imported are shown above."

However, no resources are listed 'above', and 'terraform state list' turns up nothing.

I've used similar powershell sub-expressions in terraform without having issues, until now. Does anyone know why it's doing that for the import command? Thanks.

submitted by /u/egrok
[link] [comments]

Read more here: https://www.reddit.com/r/Terraform/comments/mubphf/terraform_import_says_import_successful_but_it/

Content Attribution

This content was originally published by /u/egrok at Terraform, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: