Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azuread_application_identifier_uri parsing error for hostnames exactly 10 characters long #1401

Open
bwrogo opened this issue Jun 6, 2024 · 0 comments

Comments

@bwrogo
Copy link

bwrogo commented Jun 6, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritise this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritise the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureAD Provider) Version

terraform 1.7.4

Affected Resource(s)

  • hashicorp/terraform-provider-azuread
  • azuread_application_identifier_uri

Terraform Configuration Files

  resource "azuread_application_registration" "example" {
    display_name = "test_saml_application"
  }
  
  resource "azuread_application_identifier_uri" "example" {
    application_id = azuread_application_registration.example.id
    identifier_uri = "https://methenwegoyouuse.mywebsit.net/some-thing/auth/saml-endpoint.cgi?p=sp4"
  }

Debug Output

  �[0m�[1m�[31mPlanning failed.�[0m�[1m Terraform encountered an error while generating this plan.�[0m

  �[0m�[31m╷�[0m�[0m
  �[31m│�[0m �[0m�[1m�[31mError: �[0m�[0m�[1mparsing "/applications/{redacted_saml_app_id}/identifierUris/aHR0cHM6Ly9tZXRoZW53ZWdveW91dXNlLm15d2Vic2l0Lm5ldC9zb21lLXRoaW5nL2F1dGgvc2FtbC1lbmRwb2ludC5jZ2k/cD1zcDQ=": unexpected segment "cD1zcDQ=" present at the end of the URI (input "/applications/{redacted_saml_app_id}/identifierUris/aHR0cHM6Ly9tZXRoZW53ZWdveW91dXNlLm15d2Vic2l0Lm5ldC9zb21lLXRoaW5nL2F1dGgvc2FtbC1lbmRwb2ludC5jZ2k/cD1zcDQ=")�[0m
  �[31m│�[0m �[0m
  �[31m│�[0m �[0m�[0m  with azuread_application_identifier_uri.example,
  �[31m│�[0m �[0m  on main.tf line 18, in resource "azuread_application_identifier_uri" "example":
  �[31m│�[0m �[0m  18: resource "azuread_application_identifier_uri" "example" �[4m{�[0m�[0m
  �[31m│�[0m �[0m
  �[31m│�[0m �[0mparsing
  �[31m│�[0m �[0m"/applications/{redacted_saml_app_id}/identifierUris/aHR0cHM6Ly9tZXRoZW53ZWdveW91dXNlLm15d2Vic2l0Lm5ldC9zb21lLXRoaW5nL2F1dGgvc2FtbC1lbmRwb2ludC5jZ2k/cD1zcDQ=":
  �[31m│�[0m �[0munexpected segment "cD1zcDQ=" present at the end of the URI (input
  �[31m│�[0m �[0m"/applications/{redacted_saml_app_id}/identifierUris/aHR0cHM6Ly9tZXRoZW53ZWdveW91dXNlLm15d2Vic2l0Lm5ldC9zb21lLXRoaW5nL2F1dGgvc2FtbC1lbmRwb2ludC5jZ2k/cD1zcDQ=")
  �[31m╵�[0m�[0m

Panic Output

Expected Behavior

The Identifier URI should be registered correctly in Azure Entra ID.

Actual Behavior

The encoding of a 10 character host name is generating a forward slash / which causes a parsing error.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

Is it possible that the encoding in the provider code is being done through StdEncoding vs URLEncoding?

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

No branches or pull requests

2 participants