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

azurerm_container_registry - Support for zone_redundancy_enabled for both the ACR and each georeplications block #11706

Merged
merged 2 commits into from
Jun 17, 2021

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented May 14, 2021

This PR adds support for zone_redundancy_enabled for both the ACR and each georeplications block, which fixes #11672.

A notable change in this PR is that it modifies the type of georeplications from TypeSet to TypeList, which is due to hashicorp/terraform-plugin-sdk#160. Also the original author has confirmed that the API will return the list in reserved order, so there is no good reason to have to use a set here.

Test Result

💤 TF_ACC=1 go test -v -timeout=2h ./azurerm/internal/services/containers -run="TestAccContainerRegistry_"
2021/05/14 13:47:27 [DEBUG] not using binary driver name, it's no longer needed
2021/05/14 13:47:27 [DEBUG] not using binary driver name, it's no longer needed
=== RUN   TestAccContainerRegistry_basic_basic
=== PAUSE TestAccContainerRegistry_basic_basic
=== RUN   TestAccContainerRegistry_requiresImport
=== PAUSE TestAccContainerRegistry_requiresImport
=== RUN   TestAccContainerRegistry_basic_standard
=== PAUSE TestAccContainerRegistry_basic_standard
=== RUN   TestAccContainerRegistry_basic_premium
=== PAUSE TestAccContainerRegistry_basic_premium
=== RUN   TestAccContainerRegistry_basic_basic2Premium2basic
=== PAUSE TestAccContainerRegistry_basic_basic2Premium2basic
=== RUN   TestAccContainerRegistry_complete
=== PAUSE TestAccContainerRegistry_complete
=== RUN   TestAccContainerRegistry_update
=== PAUSE TestAccContainerRegistry_update
=== RUN   TestAccContainerRegistry_geoReplicationLocation
=== PAUSE TestAccContainerRegistry_geoReplicationLocation
=== RUN   TestAccContainerRegistry_geoReplication
=== PAUSE TestAccContainerRegistry_geoReplication
=== RUN   TestAccContainerRegistry_geoReplicationSwitch
=== PAUSE TestAccContainerRegistry_geoReplicationSwitch
=== RUN   TestAccContainerRegistry_networkAccessProfileIp
=== PAUSE TestAccContainerRegistry_networkAccessProfileIp
=== RUN   TestAccContainerRegistry_networkAccessProfile_update
=== PAUSE TestAccContainerRegistry_networkAccessProfile_update
=== RUN   TestAccContainerRegistry_networkAccessProfileVnet
=== PAUSE TestAccContainerRegistry_networkAccessProfileVnet
=== RUN   TestAccContainerRegistry_policies
=== PAUSE TestAccContainerRegistry_policies
=== RUN   TestAccContainerRegistry_identity
=== PAUSE TestAccContainerRegistry_identity
=== RUN   TestAccContainerRegistry_zoneRedundancy
=== PAUSE TestAccContainerRegistry_zoneRedundancy
=== RUN   TestAccContainerRegistry_geoReplicationZoneRedundancy
=== PAUSE TestAccContainerRegistry_geoReplicationZoneRedundancy
=== CONT  TestAccContainerRegistry_basic_basic
=== CONT  TestAccContainerRegistry_geoReplicationSwitch
=== CONT  TestAccContainerRegistry_complete
=== CONT  TestAccContainerRegistry_identity
=== CONT  TestAccContainerRegistry_geoReplicationLocation
=== CONT  TestAccContainerRegistry_geoReplication
--- PASS: TestAccContainerRegistry_basic_basic (172.81s)
=== CONT  TestAccContainerRegistry_update
--- PASS: TestAccContainerRegistry_complete (176.78s)
=== CONT  TestAccContainerRegistry_basic_premium
--- PASS: TestAccContainerRegistry_identity (194.99s)
=== CONT  TestAccContainerRegistry_basic_basic2Premium2basic
--- PASS: TestAccContainerRegistry_basic_premium (180.83s)
=== CONT  TestAccContainerRegistry_geoReplicationZoneRedundancy
--- PASS: TestAccContainerRegistry_geoReplicationSwitch (378.23s)
=== CONT  TestAccContainerRegistry_basic_standard
--- PASS: TestAccContainerRegistry_update (245.52s)
=== CONT  TestAccContainerRegistry_requiresImport
--- PASS: TestAccContainerRegistry_basic_basic2Premium2basic (324.12s)
=== CONT  TestAccContainerRegistry_zoneRedundancy
--- PASS: TestAccContainerRegistry_basic_standard (169.08s)
=== CONT  TestAccContainerRegistry_networkAccessProfileVnet
--- PASS: TestAccContainerRegistry_requiresImport (191.15s)
=== CONT  TestAccContainerRegistry_policies
2021/05/14 13:57:45 [DEBUG] AzureRM Request:
GET /subscriptions/67a9759d-d099-4aa8-8675-e6cfd669c3f4/resourceGroups/acctestRG-210514134727780387/providers/Microsoft.ContainerRegistry/registries/testAccCr210514134727780387/replications?api-version=2020-11-01-preview HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.16 (amd64-linux) go-autorest/v14.2.1 Azure-SDK-For-Go/v54.0.0 containerregistry/2020-11-01-preview HashiCorp Terraform/0.14.9 (+https://www.terraform.io) Terraform Plugin SDK/1.17.2 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
X-Ms-Correlation-Request-Id: cbe6900d-a69d-ffba-70e0-fa67f765af54
Accept-Encoding: gzip


--- PASS: TestAccContainerRegistry_geoReplicationZoneRedundancy (279.08s)
=== CONT  TestAccContainerRegistry_networkAccessProfile_update
--- PASS: TestAccContainerRegistry_geoReplicationLocation (654.12s)
=== CONT  TestAccContainerRegistry_networkAccessProfileIp
--- PASS: TestAccContainerRegistry_geoReplication (699.85s)
--- PASS: TestAccContainerRegistry_networkAccessProfileVnet (214.26s)
--- PASS: TestAccContainerRegistry_zoneRedundancy (282.00s)
--- PASS: TestAccContainerRegistry_networkAccessProfileIp (181.86s)
--- PASS: TestAccContainerRegistry_policies (1536.41s)
--- PASS: TestAccContainerRegistry_networkAccessProfile_update (1750.68s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/containers  2387.534s

@ghost ghost added the size/L label May 14, 2021
@magodo magodo marked this pull request as draft May 14, 2021 05:33
@ghost ghost added the documentation label May 14, 2021
@magodo magodo marked this pull request as ready for review May 14, 2021 07:18
Copy link
Contributor

@manicminer manicminer left a comment

Choose a reason for hiding this comment

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

@magodo Thanks for this PR. Good call on removing the pointer references for containerregistry.Replication. I squashed and rebased your commits to resolve the conflicts, and added a couple nil checks. Assuming the tests pass (running now), this should be good to merge!

@manicminer
Copy link
Contributor

Test results

Screenshot 2021-06-17 at 14 27 34

@manicminer manicminer added this to the v2.64.0 milestone Jun 17, 2021
@manicminer manicminer merged commit 148248d into hashicorp:master Jun 17, 2021
manicminer added a commit that referenced this pull request Jun 17, 2021
@github-actions
Copy link

This functionality has been released in v2.64.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for zone redundancy in azurerm_container_registry
2 participants