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

Adding private dns zones children #1044

Merged
merged 54 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
dff06b9
add A records
rahalan Feb 23, 2022
0f41186
update readme
rahalan Feb 23, 2022
ef75886
add AAAA, CNAME and MX records
rahalan Feb 24, 2022
06f5b1f
adding PTR and SOA records
rahalan Feb 24, 2022
b51335e
adding SOA, SRV and TXT records
rahalan Feb 24, 2022
63a9559
remove record
rahalan Feb 24, 2022
6f36264
fix readme
rahalan Feb 24, 2022
12bda4a
update
rahalan Feb 24, 2022
375ed57
Merge remote-tracking branch 'origin/main' into users/rahalan/addPriv…
rahalan Feb 24, 2022
0887195
fix
rahalan Feb 24, 2022
06de12d
Update to latest
AlexanderSehr Feb 24, 2022
8921e65
Merge branch 'users/rahalan/addPrivateDnsZonesChildren' of https://gi…
AlexanderSehr Feb 24, 2022
c1ce3b2
update dir names
rahalan Feb 24, 2022
3acbbd2
Merge branch 'users/rahalan/addPrivateDnsZonesChildren' of https://gi…
rahalan Feb 24, 2022
58ad154
update
rahalan Feb 24, 2022
f5dbc17
update
rahalan Feb 24, 2022
f91b1b3
test
rahalan Feb 24, 2022
9392188
fix
rahalan Feb 24, 2022
55ac3b2
test
rahalan Feb 24, 2022
89c1551
fix
rahalan Feb 25, 2022
989ec04
Update arm/Microsoft.Network/privateDnsZones/a/readme.md
rahalan Mar 1, 2022
55aefe6
Update arm/Microsoft.Network/privateDnsZones/a/readme.md
rahalan Mar 1, 2022
971006f
Update arm/Microsoft.Network/privateDnsZones/aaaa/readme.md
rahalan Mar 1, 2022
f3923de
Update arm/Microsoft.Network/privateDnsZones/cname/readme.md
rahalan Mar 1, 2022
a59d1fb
Update arm/Microsoft.Network/privateDnsZones/mx/readme.md
rahalan Mar 1, 2022
f075c11
Update arm/Microsoft.Network/privateDnsZones/soa/readme.md
rahalan Mar 1, 2022
2b99706
Update arm/Microsoft.Network/privateDnsZones/aaaa/deploy.bicep
rahalan Mar 1, 2022
a183e9d
Update arm/Microsoft.Network/privateDnsZones/aaaa/readme.md
rahalan Mar 1, 2022
1289b17
Update arm/Microsoft.Network/privateDnsZones/cname/readme.md
rahalan Mar 1, 2022
3fc70d1
Update arm/Microsoft.Network/privateDnsZones/mx/deploy.bicep
rahalan Mar 1, 2022
fb08992
Update arm/Microsoft.Network/privateDnsZones/mx/readme.md
rahalan Mar 1, 2022
2ad4b44
Update arm/Microsoft.Network/privateDnsZones/ptr/readme.md
rahalan Mar 1, 2022
9cc7478
Update arm/Microsoft.Network/privateDnsZones/soa/deploy.bicep
rahalan Mar 1, 2022
82cf9b4
Update arm/Microsoft.Network/privateDnsZones/srv/readme.md
rahalan Mar 1, 2022
1893c2b
Update arm/Microsoft.Network/privateDnsZones/srv/readme.md
rahalan Mar 1, 2022
6aff505
Update arm/Microsoft.Network/privateDnsZones/txt/deploy.bicep
rahalan Mar 1, 2022
4a14f45
Update arm/Microsoft.Network/privateDnsZones/txt/readme.md
rahalan Mar 1, 2022
0edb01e
Update arm/Microsoft.Network/privateDnsZones/txt/readme.md
rahalan Mar 1, 2022
8cd2a9b
Update arm/Microsoft.Network/privateDnsZones/txt/readme.md
rahalan Mar 1, 2022
94050f9
Update arm/Microsoft.Network/privateDnsZones/aaaa/readme.md
rahalan Mar 1, 2022
5daa92d
Update arm/Microsoft.Network/privateDnsZones/ptr/deploy.bicep
rahalan Mar 1, 2022
fe4c195
Update arm/Microsoft.Network/privateDnsZones/soa/readme.md
rahalan Mar 1, 2022
d6b8a77
Update arm/Microsoft.Network/privateDnsZones/srv/readme.md
rahalan Mar 1, 2022
c9cd8e8
rename dir
rahalan Mar 2, 2022
58cc07b
rename dir
rahalan Mar 2, 2022
fd51bcc
change to capital letters
rahalan Mar 2, 2022
afc5414
add new parameter file
rahalan Mar 2, 2022
70af6f7
fix
rahalan Mar 2, 2022
c9731cb
fix
rahalan Mar 2, 2022
fc213b6
fix
rahalan Mar 2, 2022
a3004fa
fix
rahalan Mar 2, 2022
535ee90
fix
rahalan Mar 2, 2022
fa2799f
fix
rahalan Mar 2, 2022
92925e0
fix
rahalan Mar 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ stages:
parameters:
removeDeployment: '${{ parameters.removeDeployment }}'
deploymentBlocks:
- path: $(modulePath)/.parameters/min.parameters.json
- path: $(modulePath)/.parameters/parameters.json

- stage: Publishing
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ms.network.privatednszones.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['parameters.json']
parameterFilePaths: ['min.parameters.json', 'parameters.json']
steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand Down
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"
}
}
}
114 changes: 113 additions & 1 deletion arm/Microsoft.Network/privateDnsZones/.parameters/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"value": "<<namePrefix>>-az-privdns-x-001.com"
"value": "<<namePrefix>>-az-privdns-x-002.com"
},
"roleAssignments": {
"value": [
Expand All @@ -15,6 +15,118 @@
}
]
},
"AAAA": {
"value": [
{
"name": "AAAA_2001_0db8_85a3_0000_0000_8a2e_0370_7334",
"ttl": 3600,
"aaaaRecords": [
{
"ipv6Address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
}
]
}
]
},
"A": {
"value": [
AlexanderSehr marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "A_10.240.4.4",
"ttl": 3600,
"aRecords": [
{
"ipv4Address": "10.240.4.4"
}
]
}
]
},
"CNAME": {
"value": [
{
"name": "CNAME_test",
"ttl": 3600,
"cnameRecord": {
"cname": "test"
}
}
]
},
"MX": {
"value": [
{
"name": "MX_contoso",
"ttl": 3600,
"mxRecords": [
{
"exchange": "contoso.com",
"preference": 100
}
]
}
]
},
"PTR": {
"value": [
{
"name": "PTR_contoso",
"ttl": 3600,
"ptrRecords": [
{
"ptrdname": "contoso.com"
}
]
}
]
},
"SOA": {
"value": [
{
"name": "@",
"ttl": 3600,
"soaRecord": {
"email": "azureprivatedns-host.microsoft.com",
"expireTime": 2419200,
"host": "azureprivatedns.net",
"minimumTtl": 10,
"refreshTime": 3600,
"retryTime": 300,
"serialNumber": "1"
}
}
]
},
"SRV": {
"value": [
{
"name": "SRV_contoso",
"ttl": 3600,
"srvRecords": [
{
"port": 9332,
"priority": 0,
"target": "test.contoso.com",
"weight": 0
}
]
}
]
},
"TXT": {
"value": [
{
"name": "TXT_test",
"ttl": 3600,
"txtRecords": [
{
"value": [
"test"
]
}
]
}
]
},
"virtualNetworkLinks": {
"value": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

45 changes: 45 additions & 0 deletions arm/Microsoft.Network/privateDnsZones/A/deploy.bicep
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
44 changes: 44 additions & 0 deletions arm/Microsoft.Network/privateDnsZones/A/readme.md
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)
4 changes: 4 additions & 0 deletions arm/Microsoft.Network/privateDnsZones/A/version.json
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"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

45 changes: 45 additions & 0 deletions arm/Microsoft.Network/privateDnsZones/AAAA/deploy.bicep
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
44 changes: 44 additions & 0 deletions arm/Microsoft.Network/privateDnsZones/AAAA/readme.md
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)
4 changes: 4 additions & 0 deletions arm/Microsoft.Network/privateDnsZones/AAAA/version.json
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"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

45 changes: 45 additions & 0 deletions arm/Microsoft.Network/privateDnsZones/CNAME/deploy.bicep
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
Loading