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

Bug Fix - azuredevops_serviceendpoint_azurecr - Expect serviceprincipalkey only if ServicePrincipal authentication is used #1134

Conversation

04n0
Copy link
Contributor

@04n0 04n0 commented Aug 16, 2024

All Submissions:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code follows the code style of this project.
  • I ran lint checks locally prior to submission.
  • Have you checked to ensure there aren't other open PRs for the same update/change?

What about the current behavior has changed?

When mapping Azure API response for azuredevops_serviceendpoint_azurecr resource to Terraform data structure, the credential key value authorization.parameters.serviceprincipalkey should only be processed when ServicePrincipal authentication scheme is used.
WorkloadIdentityFederation scheme does not have such a key in the API response.

Issue Number: #1124

Does this introduce a change to go.mod, go.sum or vendor/?

  • Yes
  • No

Does this introduce a breaking change?

  • Yes
  • No

Any relevant logs, error output, etc?

No

Other information

@xuzhang3 xuzhang3 changed the title fix: expect serviceprincipalkey only if ServicePrincipal authentication is used Bug Fix - azuredevops_serviceendpoint_azurecr - Expect serviceprincipalkey only if ServicePrincipal authentication is used Aug 26, 2024
@xuzhang3 xuzhang3 added the bug label Aug 26, 2024
@xuzhang3 xuzhang3 self-assigned this Aug 26, 2024
@xuzhang3
Copy link
Collaborator

=== RUN   TestAccServiceEndpointAzureCR_DataSource
=== PAUSE TestAccServiceEndpointAzureCR_DataSource
=== RUN   TestAccServiceEndpointAzureCR_Spn_Basic
=== PAUSE TestAccServiceEndpointAzureCR_Spn_Basic
=== RUN   TestAccServiceEndpointAzureCR_Spn_Update
=== PAUSE TestAccServiceEndpointAzureCR_Spn_Update
=== CONT  TestAccServiceEndpointAzureCR_DataSource
=== CONT  TestAccServiceEndpointAzureCR_Spn_Update
=== CONT  TestAccServiceEndpointAzureCR_Spn_Basic
--- PASS: TestAccServiceEndpointAzureCR_DataSource (90.04s)
--- PASS: TestAccServiceEndpointAzureCR_Spn_Basic (92.58s)
--- PASS: TestAccServiceEndpointAzureCR_Spn_Update (142.12s)
PASS
ok      github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/acceptancetests        142.643s

@xuzhang3 xuzhang3 merged commit f3e3a2c into microsoft:main Aug 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants