Skip to content

Commit

Permalink
container_registry_resource: add nil checks and minor doc wording
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer committed Jun 17, 2021
1 parent f716ebd commit 38cf423
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,9 @@ func applyGeoReplicationLocations(d *pluginsdk.ResourceData, meta interface{}, r

// delete previously deployed locations
for _, replication := range oldGeoReplications {
if replication.Location == nil {
continue
}
oldLocation := azure.NormalizeLocation(*replication.Location)

future, err := replicationClient.Delete(ctx, resourceGroup, name, oldLocation)
Expand All @@ -688,6 +691,9 @@ func applyGeoReplicationLocations(d *pluginsdk.ResourceData, meta interface{}, r

// create new geo-replication locations
for _, replication := range newGeoReplications {
if replication.Location == nil {
continue
}
locationToCreate := azure.NormalizeLocation(*replication.Location)
future, err := replicationClient.Create(ctx, resourceGroup, name, locationToCreate, replication)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/container_registry.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ The following arguments are supported:
* `trust_policy` - (Optional) A `trust_policy` block as documented below.

* `zone_redundancy_enabled` - (Optional) Whether zone redundancy is enabled for this Container Registry? Changing this forces a new resource to be created. Defaults to `false`.

~> **NOTE:** `quarantine_policy_enabled`, `retention_policy`, `trust_policy` and `zone_redundancy_enabled` are only supported on resources with the `Premium` SKU.

* `identity` - (Optional) An `identity` block as documented below.
Expand All @@ -135,7 +135,7 @@ The following arguments are supported:

* `location` - (Required) A location where the container registry should be geo-replicated.

* `zone_redundancy_enabled` - (Optional) Whether zone redundancy is enabled for this replication? Defaults to `false`.
* `zone_redundancy_enabled` - (Optional) Whether zone redundancy is enabled for this replication location? Defaults to `false`.

* `tags` - (Optional) A mapping of tags to assign to this replication location.

Expand Down Expand Up @@ -199,7 +199,7 @@ The following arguments are supported:

* `key_vault_key_id` - (Required) The ID of the Key Vault Key.

* `identity_client_id` - (Required) The client ID of the managed identity associated with the encryption key.
* `identity_client_id` - (Required) The client ID of the managed identity associated with the encryption key.

~> **NOTE** The managed identity used in `encryption` also needs to be part of the `identity` block under `identity_ids`

Expand Down

0 comments on commit 38cf423

Please sign in to comment.