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

[Modules] Update App config tests #1758

Merged
merged 8 commits into from
Aug 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -62,24 +62,8 @@
"enablePurgeProtection": {
"value": false
},
"publicNetworkAccess": {
"value": "Enabled"
},
"softDeleteRetentionInDays": {
"value": 1
},
"privateEndpoints": {
"value": [
{
"subnetResourceId": "/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<<namePrefix>>-az-vnet-x-001/subnets/<<namePrefix>>-az-subnet-x-005-privateEndpoints",
"service": "configurationStores",
"privateDnsZoneGroup": {
"privateDNSResourceIds": [
"/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io"
]
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"value": "<<namePrefix>>-az-appc-pe-001"
},
"createMode": {
"value": "Default"
},
"disableLocalAuth": {
"value": false
},
"enablePurgeProtection": {
"value": false
},
"softDeleteRetentionInDays": {
"value": 1
},
"privateEndpoints": {
"value": [
{
"subnetResourceId": "/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<<namePrefix>>-az-vnet-x-001/subnets/<<namePrefix>>-az-subnet-x-005-privateEndpoints",
"service": "configurationStores",
"privateDnsZoneGroup": {
"privateDNSResourceIds": [
"/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io"
]
}
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ resource configurationStore 'Microsoft.AppConfiguration/configurationStores@2021
createMode: createMode
disableLocalAuth: disableLocalAuth
enablePurgeProtection: sku == 'Free' ? false : enablePurgeProtection
publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) ? 'Disabled' : null)
publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : null
softDeleteRetentionInDays: sku == 'Free' ? 0 : softDeleteRetentionInDays
}
}
Expand Down
109 changes: 81 additions & 28 deletions modules/Microsoft.AppConfiguration/configurationStores/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,18 +356,6 @@ module configurationStores './Microsoft.AppConfiguration/configurationStores/dep
}
]
lock: 'CanNotDelete'
privateEndpoints: [
{
privateDnsZoneGroup: {
privateDNSResourceIds: [
'/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io'
]
}
service: 'configurationStores'
subnetResourceId: '/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<<namePrefix>>-az-vnet-x-001/subnets/<<namePrefix>>-az-subnet-x-005-privateEndpoints'
}
]
publicNetworkAccess: 'Enabled'
roleAssignments: [
{
principalIds: [
Expand Down Expand Up @@ -443,22 +431,6 @@ module configurationStores './Microsoft.AppConfiguration/configurationStores/dep
"lock": {
"value": "CanNotDelete"
},
"privateEndpoints": {
"value": [
{
"privateDnsZoneGroup": {
"privateDNSResourceIds": [
"/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io"
]
},
"service": "configurationStores",
"subnetResourceId": "/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<<namePrefix>>-az-vnet-x-001/subnets/<<namePrefix>>-az-subnet-x-005-privateEndpoints"
}
]
},
"publicNetworkAccess": {
"value": "Enabled"
},
"roleAssignments": {
"value": [
{
Expand All @@ -481,3 +453,84 @@ module configurationStores './Microsoft.AppConfiguration/configurationStores/dep

</details>
<p>

<h3>Example 3: Pe</h3>

<details>

<summary>via Bicep module</summary>

```bicep
module configurationStores './Microsoft.AppConfiguration/configurationStores/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-configurationStores'
params: {
// Required parameters
name: '<<namePrefix>>-az-appc-pe-001'
// Non-required parameters
createMode: 'Default'
disableLocalAuth: false
enablePurgeProtection: false
privateEndpoints: [
{
privateDnsZoneGroup: {
privateDNSResourceIds: [
'/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io'
]
}
service: 'configurationStores'
subnetResourceId: '/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<<namePrefix>>-az-vnet-x-001/subnets/<<namePrefix>>-az-subnet-x-005-privateEndpoints'
}
]
softDeleteRetentionInDays: 1
}
}
```

</details>
<p>

<details>

<summary>via JSON Parameter file</summary>

```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"name": {
"value": "<<namePrefix>>-az-appc-pe-001"
},
// Non-required parameters
"createMode": {
"value": "Default"
},
"disableLocalAuth": {
"value": false
},
"enablePurgeProtection": {
"value": false
},
"privateEndpoints": {
"value": [
{
"privateDnsZoneGroup": {
"privateDNSResourceIds": [
"/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io"
]
},
"service": "configurationStores",
"subnetResourceId": "/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<<namePrefix>>-az-vnet-x-001/subnets/<<namePrefix>>-az-subnet-x-005-privateEndpoints"
}
]
},
"softDeleteRetentionInDays": {
"value": 1
}
}
}
```

</details>
<p>