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

New Resource: azurerm_container_registry_credential_set #27528

Merged
merged 15 commits into from
Jan 16, 2025

Conversation

jan-mrm
Copy link
Contributor

@jan-mrm jan-mrm commented Sep 27, 2024

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

Adding a new resource in order to manage Credential Sets for Azure Container Registries.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Changes to existing Resource / Data Source

none

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)
make acctests SERVICE='containers' TESTARGS='-run=TestAccContainerRegistryCredentialSet_' TESTTIMEOUT='60m'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/containers -run=TestAccContainerRegistryCredentialSet_ -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccContainerRegistryCredentialSet_basic
=== PAUSE TestAccContainerRegistryCredentialSet_basic
=== RUN   TestAccContainerRegistryCredentialSet_requiresImport
=== PAUSE TestAccContainerRegistryCredentialSet_requiresImport
=== RUN   TestAccContainerRegistryCredentialSet_update
=== PAUSE TestAccContainerRegistryCredentialSet_update
=== CONT  TestAccContainerRegistryCredentialSet_basic
=== CONT  TestAccContainerRegistryCredentialSet_update
=== CONT  TestAccContainerRegistryCredentialSet_requiresImport
--- PASS: TestAccContainerRegistryCredentialSet_basic (120.32s)
--- PASS: TestAccContainerRegistryCredentialSet_requiresImport (122.08s)
--- PASS: TestAccContainerRegistryCredentialSet_update (156.95s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/containers    159.627s

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Closes #26539

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@rs-sh
Copy link

rs-sh commented Nov 13, 2024

@stephybun with the caching rule enforcing docker.io credentials this needs to be bumped up in priority for review, please. :)

…-credential-set

# Conflicts:
#	internal/services/containers/client/client.go
…-credential-set

# Conflicts:
#	.github/labeler-issue-triage.yml
…Required as discussed in the pull request (but the api will only accept type SystemAssigned)
…tyRequired to SystemAssignedIdentityRequired
…sts. update markdown. update flattenIdentity
@stephybun
Copy link
Member

@jan-mrm I've opened a PR on Pandora which will patch the SDK to match the behaviour we see in the API (instead of what's been defined in the Rest API spec). Once that's made it through to hashicorp/go-azure-sdk we can bump the version in the provider, rebase this PR on top of main and get rid of the custom expand/flatten which will resolve the casing issue.

@jan-mrm
Copy link
Contributor Author

jan-mrm commented Jan 16, 2025

@stephybun thanks for the workaround implementation. I updated the go-azure-sdk and updated this branch. Local testing looks good on my end and the new acctests pass locally.

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks for your effort and patience here @jan-mrm LGTM 🚀

@stephybun stephybun merged commit 28dae03 into hashicorp:main Jan 16, 2025
33 checks passed
@github-actions github-actions bot added this to the v4.16.0 milestone Jan 16, 2025
stephybun added a commit that referenced this pull request Jan 16, 2025
jackofallops added a commit that referenced this pull request Jan 16, 2025
* update for #27680

* Update CHANGELOG.md for #28465

* Update CHANGELOG.md #27932

* Update CHANGELOG.md for #28505

* Update CHANGELOG.md for #28474

* Update CHANGELOG.md #28516

* Update CHANGELOG for #28456

* Update CHANGELOG.md for #28472

* Update CHANGELOG.md #28307

* Update CHANGELOG.md for #27859

* Update for #28519

* Update for #27791 #27528

* Update CHANGELOG.md for #28527

* update changelog links and generate provider schema

---------

Co-authored-by: jackofallops <[email protected]>
Co-authored-by: catriona-m <[email protected]>
Co-authored-by: sreallymatt <[email protected]>
Co-authored-by: Matthew Frahry <[email protected]>
Co-authored-by: jackofallops <[email protected]>
NotTheEvilOne pushed a commit to b1-systems/terraform-provider-azurerm that referenced this pull request Jan 20, 2025
…27528)

* feat: add new resource azurerm_container_registry_credential_set

* fix: set auth_credentials correctly in import test

* refactor: implement review feedback

* refactor: format docs

* chore: update api version in new credential set resource after it has been updated in the main

* chore: add changes from 'make generate'

* refactor: change implementation to SystemAssignedUserAssignedIdentityRequired as discussed in the pull request (but the api will only accept type SystemAssigned)

* refactor: change implementation from SystemAssignedUserAssignedIdentityRequired to SystemAssignedIdentityRequired

* refactor: implement review feedback - import step and key vault in tests. update markdown. update flattenIdentity

* refactor: tf fmt

* refactor: update to now returned ModelSystemAssigned which is now returned because of the implemented workaround in the go-azure-sdk

* Update internal/services/containers/container_registry_credential_set_resource.go

Co-authored-by: stephybun <[email protected]>

---------

Co-authored-by: stephybun <[email protected]>
NotTheEvilOne pushed a commit to b1-systems/terraform-provider-azurerm that referenced this pull request Jan 20, 2025
* update for hashicorp#27680

* Update CHANGELOG.md for hashicorp#28465

* Update CHANGELOG.md hashicorp#27932

* Update CHANGELOG.md for hashicorp#28505

* Update CHANGELOG.md for hashicorp#28474

* Update CHANGELOG.md hashicorp#28516

* Update CHANGELOG for hashicorp#28456

* Update CHANGELOG.md for hashicorp#28472

* Update CHANGELOG.md hashicorp#28307

* Update CHANGELOG.md for hashicorp#27859

* Update for hashicorp#28519

* Update for hashicorp#27791 hashicorp#27528

* Update CHANGELOG.md for hashicorp#28527

* update changelog links and generate provider schema

---------

Co-authored-by: jackofallops <[email protected]>
Co-authored-by: catriona-m <[email protected]>
Co-authored-by: sreallymatt <[email protected]>
Co-authored-by: Matthew Frahry <[email protected]>
Co-authored-by: jackofallops <[email protected]>
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.

Support for Container Registry Credential Set
4 participants