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

Importing instructions for azuread_service_principal are wrong in the DOCS #1604

Closed
adelinn opened this issue Dec 24, 2024 · 2 comments
Closed

Comments

@adelinn
Copy link
Contributor

adelinn commented Dec 24, 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 version: latest as of now (should be irrelevant for this issue)
Provider version: azuread v3.0.2

Affected Resource(s)

  • azuread_service_principal

Terraform Configuration Files

Irrelevant

Debug Output

Panic Output

Expected Behavior

The docs should have stated that one must use /servicePrincipals/servicePrincipalId instead of saying use servicePrincipalId as identifier for the imported resurce.

Actual Behavior

When running the import command as stated in the docs (terraform import azuread_service_principal.example 00000000-0000-0000-0000-000000000000), one gets this:

Error: parsing "e18f75b7-<redacted>73e": parsing the ServicePrincipal ID: the number of segments didn't match

Expected a ServicePrincipal ID that matched (containing 2 segments):

> /servicePrincipals/servicePrincipalId

However this value was provided (which was parsed into 0 segments):

> e18f75b7-<redacted>73e

The following Segments are expected:

* Segment 0 - this should be the literal value "servicePrincipals"
* Segment 1 - this should be the user specified value for this servicePrincipalId [for example "servicePrincipalId"]

The following Segments were parsed:

* Segment 0 - not found
* Segment 1 - not found

Steps to Reproduce

Run an import as stated in the docs.

Important Factoids

None

References

None

@logikkreise
Copy link

The issue will automatically be fixed with the new release. 🙂 The GitHub Docs are up to date, but the terraform registry links to the last release and it was fixed in #1524 after the release of 3.0.2.

@adelinn
Copy link
Contributor Author

adelinn commented Jan 6, 2025

Thanks. I'll close this issue now then.

@adelinn adelinn closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants