-
Notifications
You must be signed in to change notification settings - Fork 437
Adding properties to Azure Container Registry #1079
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6a1f488
update ACR
rahalan d19dbed
test replications
rahalan a00894c
fix
rahalan 14ca98d
add description
rahalan 4c08f79
fix
rahalan e9e8f6c
add paramter
rahalan b72664f
test
rahalan 288486c
test
rahalan cb503c3
fix
rahalan 4c84e4d
fix
rahalan 0a1b831
test
rahalan b8f64cf
test
rahalan 423edfa
test
rahalan 5aa8ed3
test
rahalan 452afe2
test
rahalan 89ff5fd
test
rahalan 32ea95e
test
rahalan 9f3a7b8
test
rahalan c8ec071
test
rahalan 132cc72
test
rahalan 7ebfa65
test
rahalan b416e28
test
rahalan e79e030
fix
rahalan d7d28f8
test
rahalan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
arm/Microsoft.ContainerRegistry/registries/replications/.bicep/nested_cuaId.bicep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
53 changes: 53 additions & 0 deletions
53
arm/Microsoft.ContainerRegistry/registries/replications/deploy.bicep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| @description('Required. The name of the registry.') | ||
| param registryName string | ||
|
|
||
| @description('Required. The name of the replication.') | ||
| param name string | ||
|
|
||
| @description('Optional. Location for all resources.') | ||
| param location string = resourceGroup().location | ||
|
|
||
| @description('Optional. Tags of the resource.') | ||
| param tags object = {} | ||
|
|
||
| @description('Optional. Specifies whether the replication regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications.') | ||
| param regionEndpointEnabled bool = true | ||
|
|
||
| @allowed([ | ||
| 'Disabled' | ||
| 'Enabled' | ||
| ]) | ||
| @description('Optional. Whether or not zone redundancy is enabled for this container registry') | ||
| param zoneRedundancy string = 'Disabled' | ||
|
|
||
| @description('Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered') | ||
| param cuaId string = '' | ||
|
|
||
| module pid_cuaId './.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) { | ||
| name: 'pid-${cuaId}' | ||
| params: {} | ||
| } | ||
|
|
||
| resource registry 'Microsoft.ContainerRegistry/registries@2021-09-01' existing = { | ||
| name: registryName | ||
| } | ||
|
|
||
| resource replication 'Microsoft.ContainerRegistry/registries/replications@2021-12-01-preview' = { | ||
| name: name | ||
| parent: registry | ||
| location: location | ||
| tags: tags | ||
| properties: { | ||
| regionEndpointEnabled: regionEndpointEnabled | ||
| zoneRedundancy: zoneRedundancy | ||
| } | ||
| } | ||
|
|
||
| @description('The name of the replication.') | ||
| output name string = replication.name | ||
|
|
||
| @description('The resource ID of the replication.') | ||
| output resourceId string = replication.id | ||
|
|
||
| @description('The name of the resource group the replication was created in.') | ||
| output resourceGroupName string = resourceGroup().name |
50 changes: 50 additions & 0 deletions
50
arm/Microsoft.ContainerRegistry/registries/replications/readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # ContainerRegistry Registries Replications `[Microsoft.ContainerRegistry/registries/replications]` | ||
|
|
||
| This module deploys ContainerRegistry Registries Replications. | ||
|
|
||
| ## Resource Types | ||
|
|
||
| | Resource Type | API Version | | ||
| | :-- | :-- | | ||
| | `Microsoft.ContainerRegistry/registries/replications` | 2021-12-01-preview | | ||
|
|
||
| ## Parameters | ||
|
|
||
| | Parameter Name | Type | Default Value | Possible Values | Description | | ||
| | :-- | :-- | :-- | :-- | :-- | | ||
| | `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | ||
| | `location` | string | `[resourceGroup().location]` | | Optional. Location for all resources. | | ||
| | `name` | string | | | Required. The name of the replication. | | ||
| | `regionEndpointEnabled` | bool | `True` | | Optional. Specifies whether the replication regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications. | | ||
| | `registryName` | string | | | Required. The name of the registry. | | ||
| | `tags` | object | `{object}` | | Optional. Tags of the resource. | | ||
| | `zoneRedundancy` | string | `Disabled` | `[Disabled, Enabled]` | Optional. Whether or not zone redundancy is enabled for this container registry | | ||
|
|
||
| ### Parameter Usage: `tags` | ||
|
|
||
| Tag names and tag values can be provided as needed. A tag can be left without a value. | ||
|
|
||
| ```json | ||
| "tags": { | ||
| "value": { | ||
| "Environment": "Non-Prod", | ||
| "Contact": "test.user@testcompany.com", | ||
| "PurchaseOrder": "1234", | ||
| "CostCenter": "7890", | ||
| "ServiceName": "DeploymentValidation", | ||
| "Role": "DeploymentValidation" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Outputs | ||
|
|
||
| | Output Name | Type | Description | | ||
| | :-- | :-- | :-- | | ||
| | `name` | string | The name of the replication. | | ||
| | `resourceGroupName` | string | The name of the resource group the replication was created in. | | ||
| | `resourceId` | string | The resource ID of the replication. | | ||
|
|
||
| ## Template references | ||
|
|
||
| - [Registries/Replications](https://docs.microsoft.com/en-us/azure/templates/Microsoft.ContainerRegistry/2021-12-01-preview/registries/replications) |
4 changes: 4 additions & 0 deletions
4
arm/Microsoft.ContainerRegistry/registries/replications/version.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", | ||
| "version": "0.4" | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.