Closed Hiwazup closed 2 months ago
@Hiwazup The error indicates that the azurerm_key_vault.this.id
has a trailing slash. Wondering is the key vault created by terraform, or you imported it?
Hi @magodo, the Key Vault was imported with the resource described above.
I just tried to import a key vault using the latest provider, and the id seems good to me. Would you mind try re-importing this key vault again, and output the id to see if the trailing slash still exists?
Hi @magodo, re-importing the Key Vault made me realise that I accidentally had a slash at the end of the ID when I imported it the first time. When I re-imported it, I spotted the issue and now it is behaving as expected. Thanks for taking the time to look into the issue!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Terraform Version
1.6.2
AzureRM Provider Version
3.114.0
Affected Resource(s)/Data Source(s)
azurerm_private_endpoint
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Private Endpoint should be imported into Terraform State and should show no changes in TF Plan.
Actual Behaviour
After importing, TF Plan shows that the Private Endpoint must be replaced due to the trailing slash in the private_connection_resource_id. If
trimsuffix(azurerm_key_vault.this.id, "/")
is used in the config then the plan does not report issues.Steps to Reproduce
Important Factoids
No response
References
No response