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

add-ons/azure_devops_v1: add service endpoints for Azure container registry #283

Merged

Conversation

sschne
Copy link

@sschne sschne commented Nov 25, 2021

  • 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 Pull Requests for the same update/change?

Description

Introduces a new component service_endpoints_acr to add a Docker Registry service connection to Azure DevOps from an Azure Container registry created in a previous landing zone.
It uses the azuredevops_serviceendpoint_dockerregistry resource rather than the azuredevops_serviceendpoint_azurecr resource, as the latter requires to be able to create a service principal for connecting to the ACR on demand, which seems not feasible to me.

The component requires an existing azure_container_registries with admin_enabled.

Does this introduce a breaking change

  • YES
  • NO

Testing

@ghost
Copy link

ghost commented Nov 25, 2021

CLA assistant check
All CLA requirements met.

@LaurentLesle LaurentLesle added the enhancement New feature or request label Dec 7, 2021
iriahk89
iriahk89 previously approved these changes Dec 7, 2021
Copy link
Contributor

@iriahk89 iriahk89 left a comment

Choose a reason for hiding this comment

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

LGTM

@iriahk89 iriahk89 dismissed their stale review December 7, 2021 08:26

conflict with another PR

Copy link
Contributor

@iriahk89 iriahk89 left a comment

Choose a reason for hiding this comment

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

I think this pattern from another PR: #264 would be a better solution as it will reduce the maintenance to remove additional variable every time we have a new target endpoint (GitHub, ACR etc.)

@arnaudlh arnaudlh added the do not merge Do not merge this PR until flag is removed label Dec 9, 2021
@brk3
Copy link
Contributor

brk3 commented Dec 14, 2021

Hi! This looks good to me and actually covers off a similar use case I'm currently working through (#290).

If I'm reading @iriahk89's comment correctly you just need to replace your variable service_endpoints_acr with a for_each across var.service_endpoints, checking if your type attr matches a predetermined value (https://github.com/Azure/caf-terraform-landingzones/pull/264/files#diff-e6f612f660ccb2be61580cacce596b956a2f967414cc2c6e895103dd78f8aa9eR4-R7). We could go with "Docker" or "acr".

@sschne sschne force-pushed the f/azdo-endpoint-container-registry branch from 8a3adfd to baae587 Compare December 20, 2021 14:34
@sschne sschne changed the base branch from master to 2112.int December 20, 2021 14:35
@sschne
Copy link
Author

sschne commented Dec 20, 2021

@iriahk89 I have updated the resource according to the given pattern

@arnaudlh arnaudlh removed the do not merge Do not merge this PR until flag is removed label Jan 13, 2022
@arnaudlh arnaudlh added this to the 2201 milestone Jan 13, 2022
Copy link
Contributor

@LaurentLesle LaurentLesle left a comment

Choose a reason for hiding this comment

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

LGTM

@LaurentLesle LaurentLesle merged commit 3b84cf6 into Azure:2112.int Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants