-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding private dns zones children (#1044)
* add A records * update readme * add AAAA, CNAME and MX records * adding PTR and SOA records * adding SOA, SRV and TXT records * remove record * fix readme * update * fix * Update to latest * update dir names * update * update * test * fix * test * fix Co-authored-by: MrMCake <[email protected]>
- Loading branch information
1 parent
3fb40b1
commit 59d2602
Showing
38 changed files
with
1,014 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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 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
9 changes: 9 additions & 0 deletions
9
arm/Microsoft.Network/privateDnsZones/.parameters/min.parameters.json
This file contains 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,9 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"name": { | ||
"value": "<<namePrefix>>-az-privdns-x-001.com" | ||
} | ||
} | ||
} |
This file contains 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.Network/privateDnsZones/A/.bicep/nested_cuaId.bicep
This file contains 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 @@ | ||
|
This file contains 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,45 @@ | ||
@description('Required. Private DNS zone name.') | ||
param privateDnsZoneName string | ||
|
||
@description('Required. The name of the A record.') | ||
param name string | ||
|
||
@description('Optional. The list of A records in the record set.') | ||
param aRecords array = [] | ||
|
||
@description('Optional. The metadata attached to the record set.') | ||
param metadata object = {} | ||
|
||
@description('Optional. The TTL (time-to-live) of the records in the record set.') | ||
param ttl int = 3600 | ||
|
||
@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 privateDnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' existing = { | ||
name: privateDnsZoneName | ||
} | ||
|
||
resource A 'Microsoft.Network/privateDnsZones/A@2020-06-01' = { | ||
name: name | ||
parent: privateDnsZone | ||
properties: { | ||
aRecords: aRecords | ||
metadata: metadata | ||
ttl: ttl | ||
} | ||
} | ||
|
||
@description('The name of the deployed A record') | ||
output name string = A.name | ||
|
||
@description('The resource ID of the deployed A record') | ||
output resourceId string = A.id | ||
|
||
@description('The resource group of the deployed A record') | ||
output resourceGroupName string = resourceGroup().name |
This file contains 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,44 @@ | ||
# Private DNS Zone A record `[Microsoft.Network/privateDnsZones/A]` | ||
|
||
This module deploys a Private DNS Zone A record. | ||
|
||
## Resource Types | ||
|
||
| Resource Type | API Version | | ||
| :-- | :-- | | ||
| `Microsoft.Network/privateDnsZones/A` | 2020-06-01 | | ||
|
||
## Parameters | ||
|
||
| Parameter Name | Type | Default Value | Possible Values | Description | | ||
| :-- | :-- | :-- | :-- | :-- | | ||
| `aRecords` | array | `[]` | | Optional. The list of A records in the record set. | | ||
| `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | ||
| `metadata` | object | `{object}` | | Optional. The metadata attached to the record set. | | ||
| `name` | string | | | Required. The name of the A record. | | ||
| `privateDnsZoneName` | string | | | Required. Private DNS zone name. | | ||
| `ttl` | int | `3600` | | Optional. The TTL (time-to-live) of the records in the record set. | | ||
|
||
### Parameter Usage: `aRecords` | ||
|
||
```json | ||
"aRecords": { | ||
"value": [ | ||
{ | ||
"ipv4Address": "string" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Outputs | ||
|
||
| Output Name | Type | Description | | ||
| :-- | :-- | :-- | | ||
| `name` | string | The name of the deployed A record | | ||
| `resourceGroupName` | string | The resource group of the deployed A record | | ||
| `resourceId` | string | The resource ID of the deployed A record | | ||
|
||
## Template references | ||
|
||
- [Privatednszones/A](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2020-06-01/privateDnsZones/A) |
This file contains 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" | ||
} |
1 change: 1 addition & 0 deletions
1
arm/Microsoft.Network/privateDnsZones/AAAA/.bicep/nested_cuaId.bicep
This file contains 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 @@ | ||
|
This file contains 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,45 @@ | ||
@description('Required. Private DNS zone name.') | ||
param privateDnsZoneName string | ||
|
||
@description('Required. The name of the AAAA record.') | ||
param name string | ||
|
||
@description('Optional. The list of AAAA records in the record set.') | ||
param aaaaRecords array = [] | ||
|
||
@description('Optional. The metadata attached to the record set.') | ||
param metadata object = {} | ||
|
||
@description('Optional. The TTL (time-to-live) of the records in the record set.') | ||
param ttl int = 3600 | ||
|
||
@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 privateDnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' existing = { | ||
name: privateDnsZoneName | ||
} | ||
|
||
resource AAAA 'Microsoft.Network/privateDnsZones/AAAA@2020-06-01' = { | ||
name: name | ||
parent: privateDnsZone | ||
properties: { | ||
aaaaRecords: aaaaRecords | ||
metadata: metadata | ||
ttl: ttl | ||
} | ||
} | ||
|
||
@description('The name of the deployed AAAA record') | ||
output name string = AAAA.name | ||
|
||
@description('The resource ID of the deployed AAAA record') | ||
output resourceId string = AAAA.id | ||
|
||
@description('The resource group of the deployed AAAA record') | ||
output resourceGroupName string = resourceGroup().name |
This file contains 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,44 @@ | ||
# Private DNS Zone AAAA record `[Microsoft.Network/privateDnsZones/AAAA]` | ||
|
||
This module deploys a Private DNS Zone AAAA record. | ||
|
||
## Resource Types | ||
|
||
| Resource Type | API Version | | ||
| :-- | :-- | | ||
| `Microsoft.Network/privateDnsZones/AAAA` | 2020-06-01 | | ||
|
||
## Parameters | ||
|
||
| Parameter Name | Type | Default Value | Possible Values | Description | | ||
| :-- | :-- | :-- | :-- | :-- | | ||
| `aaaaRecords` | array | `[]` | | Optional. The list of AAAA records in the record set. | | ||
| `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | ||
| `metadata` | object | `{object}` | | Optional. The metadata attached to the record set. | | ||
| `name` | string | | | Required. The name of the AAAA record. | | ||
| `privateDnsZoneName` | string | | | Required. Private DNS zone name. | | ||
| `ttl` | int | `3600` | | Optional. The TTL (time-to-live) of the records in the record set. | | ||
|
||
### Parameter Usage: `aaaaRecords` | ||
|
||
```json | ||
"aaaaRecords": { | ||
"value": [ | ||
{ | ||
"ipv6Address": "string" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Outputs | ||
|
||
| Output Name | Type | Description | | ||
| :-- | :-- | :-- | | ||
| `name` | string | The name of the deployed AAAA record | | ||
| `resourceGroupName` | string | The resource group of the deployed AAAA record | | ||
| `resourceId` | string | The resource ID of the deployed AAAA record | | ||
|
||
## Template references | ||
|
||
- [Privatednszones/AAAA](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2020-06-01/privateDnsZones/AAAA) |
This file contains 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" | ||
} |
1 change: 1 addition & 0 deletions
1
arm/Microsoft.Network/privateDnsZones/CNAME/.bicep/nested_cuaId.bicep
This file contains 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 @@ | ||
|
This file contains 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,45 @@ | ||
@description('Required. Private DNS zone name.') | ||
param privateDnsZoneName string | ||
|
||
@description('Required. The name of the CNAME record.') | ||
param name string | ||
|
||
@description('Optional. A CNAME record.') | ||
param cnameRecord object = {} | ||
|
||
@description('Optional. The metadata attached to the record set.') | ||
param metadata object = {} | ||
|
||
@description('Optional. The TTL (time-to-live) of the records in the record set.') | ||
param ttl int = 3600 | ||
|
||
@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 privateDnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' existing = { | ||
name: privateDnsZoneName | ||
} | ||
|
||
resource CNAME 'Microsoft.Network/privateDnsZones/CNAME@2020-06-01' = { | ||
name: name | ||
parent: privateDnsZone | ||
properties: { | ||
cnameRecord: cnameRecord | ||
metadata: metadata | ||
ttl: ttl | ||
} | ||
} | ||
|
||
@description('The name of the deployed CNAME record') | ||
output name string = CNAME.name | ||
|
||
@description('The resource ID of the deployed CNAME record') | ||
output resourceId string = CNAME.id | ||
|
||
@description('The resource group of the deployed CNAME record') | ||
output resourceGroupName string = resourceGroup().name |
Oops, something went wrong.