Skip to content

Conversation

kenchan0130
Copy link
Contributor

FIX #1691

Changes

Added url.PathEscape to handle special characters in resource IDs.

Impact

Resolves parsing errors and improves the reliability of managing Entra ID applications using Terraform.

Breaking Change

This update includes a breaking change.
Users will need to update their configurations to accommodate the new escaping logic for resource IDs.

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kenchan0130 - Thanks for this PR. I believe that URL encoding the data could leave to regressions elsewhere. Shell incompatible characters in IDs can be catered for by simply enclosing the ID in " as below. If you can update the doc with the suggestion and revert the code changes, I can this merged.

Thanks


```shell
terraform import azuread_application_identifier_uri.example /applications/00000000-0000-0000-0000-000000000000/identifierUris/aHR0cHM6Ly9leGFtcGxlLm5ldC8=
terraform import azuread_application_identifier_uri.example /applications/00000000-0000-0000-0000-000000000000/identifierUris/aHR0cHM6Ly9leGFtcGxlLm5ldC8%3D
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL / shell incompatible encoding can be supported by quoting the import line on the cli, such as:

Suggested change
terraform import azuread_application_identifier_uri.example /applications/00000000-0000-0000-0000-000000000000/identifierUris/aHR0cHM6Ly9leGFtcGxlLm5ldC8%3D
terraform import azuread_application_identifier_uri.example "/applications/00000000-0000-0000-0000-000000000000/identifierUris/aHR0cHM6Ly9leGFtcGxlLm5ldC8="

@kenchan0130
Copy link
Contributor Author

@jackofallops

Shell incompatible characters in IDs can be catered for by simply enclosing the ID in " as below. If you can update the doc with the suggestion and revert the code changes, I can this merged.

This differs from my understanding.
The core issue lies in the fact that the following call does not account for the possibility that the base64-encoded string may contain the / character:

Even when using the import block, the same error described in issue #1691 still occurs.

Therefore, this is not a shell-related issue.

@kenchan0130
Copy link
Contributor Author

@jackofallops
Please let me know if you need more information concerning this matter.

@tagur87
Copy link
Contributor

tagur87 commented Jul 4, 2025

We are also interested in this fix, please let us know if we can help support at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parsing Error with azuread_application_identifier_uri due to / in ID
3 participants