hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.52k stars 4.6k forks source link

Failed to import a `azurerm_api_management_subscription` #21249

Open magodo opened 1 year ago

magodo commented 1 year ago

Is there an existing issue for this?

Community Note

Terraform Version

1.3.9

AzureRM Provider Version

3.50.0

Affected Resource(s)/Data Source(s)

azurerm_api_management_subscription

Terraform Configuration Files

resource "azurerm_api_management_subscription" "test" {}

Debug Output/Panic Output

│ Error: parsing scope into product/ api id "/subscriptions/****/resourceGroups/acctestRG-example/providers/Microsoft.ApiManagement/service/acctestAM-01/": ID was missing the `apis` element

Expected Behaviour

Resource be imported with no error.

Actual Behaviour

Failed to read, actually parsing the scope id of the subscription resource id.

Steps to Reproduce

terraform import

Important Factoids

No response

References

https://github.com/Azure/aztfexport/issues/444

marzoukali commented 1 year ago

I have the same issue. Any updates?

rbaronbt commented 1 year ago

I also have the same error.