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] Added new bicep features to tests #3902

Merged
merged 10 commits into from
Sep 5, 2023
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
{
name: 'defaultSubnet'
properties: {
addressPrefix: addressPrefix
addressPrefix: cidrSubnet(addressPrefix, 16, 0)
}
}
]
Expand Down
1 change: 1 addition & 0 deletions modules/aad/domain-service/.test/common/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ module testDeployment '../../main.bicep' = {
]
sku: 'Standard'
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand Down
2 changes: 2 additions & 0 deletions modules/aad/domain-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ module domainService './aad/domain-service/main.bicep' = {
sku: 'Standard'
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
}
Expand Down Expand Up @@ -322,6 +323,7 @@ module domainService './aad/domain-service/main.bicep' = {
"tags": {
"value": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ module testDeployment '../../main.bicep' = {
diagnosticEventHubAuthorizationRuleId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
diagnosticEventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand Down
2 changes: 2 additions & 0 deletions modules/analysis-services/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ module server './analysis-services/server/main.bicep' = {
skuName: 'S0'
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
}
Expand Down Expand Up @@ -257,6 +258,7 @@ module server './analysis-services/server/main.bicep' = {
"tags": {
"value": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ module testDeployment '../../main.bicep' = {
}
]
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand Down
1 change: 1 addition & 0 deletions modules/api-management/service/.test/max/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ module testDeployment '../../main.bicep' = {
'${nestedDependencies.outputs.managedIdentityResourceId}': {}
}
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand Down
4 changes: 4 additions & 0 deletions modules/api-management/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ module service './api-management/service/main.bicep' = {
]
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
}
Expand Down Expand Up @@ -408,6 +409,7 @@ module service './api-management/service/main.bicep' = {
"tags": {
"value": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
}
Expand Down Expand Up @@ -557,6 +559,7 @@ module service './api-management/service/main.bicep' = {
systemAssignedIdentity: true
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
userAssignedIdentities: {
Expand Down Expand Up @@ -750,6 +753,7 @@ module service './api-management/service/main.bicep' = {
"tags": {
"value": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ module testDeployment '../../main.bicep' = {
softDeleteRetentionInDays: 1
systemAssignedIdentity: true
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
{
name: 'defaultSubnet'
properties: {
addressPrefix: addressPrefix
addressPrefix: cidrSubnet(addressPrefix, 16, 0)
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ module testDeployment '../../main.bicep' = {
service: 'configurationStores'
subnetResourceId: nestedDependencies.outputs.subnetResourceId
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
}
]
softDeleteRetentionInDays: 1
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand Down
6 changes: 6 additions & 0 deletions modules/app-configuration/configuration-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ module configurationStore './app-configuration/configuration-store/main.bicep' =
systemAssignedIdentity: true
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
}
Expand Down Expand Up @@ -455,6 +456,7 @@ module configurationStore './app-configuration/configuration-store/main.bicep' =
"tags": {
"value": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
}
Expand Down Expand Up @@ -538,13 +540,15 @@ module configurationStore './app-configuration/configuration-store/main.bicep' =
subnetResourceId: '<subnetResourceId>'
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
}
]
softDeleteRetentionInDays: 1
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
}
Expand Down Expand Up @@ -592,6 +596,7 @@ module configurationStore './app-configuration/configuration-store/main.bicep' =
"subnetResourceId": "<subnetResourceId>",
"tags": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
}
Expand All @@ -603,6 +608,7 @@ module configurationStore './app-configuration/configuration-store/main.bicep' =
"tags": {
"value": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
}
Expand Down
1 change: 1 addition & 0 deletions modules/app/container-app/.test/common/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module testDeployment '../../main.bicep' = {
params: {
name: '${namePrefix}${serviceShort}001'
tags: {
'hidden-title': 'This is visible in the resource name'
Env: 'test'
}
enableDefaultTelemetry: enableDefaultTelemetry
Expand Down
1 change: 1 addition & 0 deletions modules/app/container-app/.test/min/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module testDeployment '../../main.bicep' = {
params: {
name: '${namePrefix}${serviceShort}001'
tags: {
'hidden-title': 'This is visible in the resource name'
Env: 'test'
}
enableDefaultTelemetry: enableDefaultTelemetry
Expand Down
8 changes: 6 additions & 2 deletions modules/app/container-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ module containerApp './app/container-app/main.bicep' = {
}
tags: {
Env: 'test'
'hidden-title': 'This is visible in the resource name'
}
userAssignedIdentities: {
'<managedIdentityResourceId>': {}
Expand Down Expand Up @@ -349,7 +350,8 @@ module containerApp './app/container-app/main.bicep' = {
},
"tags": {
"value": {
"Env": "test"
"Env": "test",
"hidden-title": "This is visible in the resource name"
}
},
"userAssignedIdentities": {
Expand Down Expand Up @@ -392,6 +394,7 @@ module containerApp './app/container-app/main.bicep' = {
location: '<location>'
tags: {
Env: 'test'
'hidden-title': 'This is visible in the resource name'
}
}
}
Expand Down Expand Up @@ -437,7 +440,8 @@ module containerApp './app/container-app/main.bicep' = {
},
"tags": {
"value": {
"Env": "test"
"Env": "test",
"hidden-title": "This is visible in the resource name"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ param logAnalyticsWorkspaceName string
param virtualNetworkName string

var addressPrefix = '10.0.0.0/16'
var subnetAddressPrefix = '10.0.0.0/23'

resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
name: logAnalyticsWorkspaceName
Expand Down Expand Up @@ -37,7 +36,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
{
name: 'defaultSubnet'
properties: {
addressPrefix: subnetAddressPrefix
addressPrefix: cidrSubnet(addressPrefix, 16, 0)
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module testDeployment '../../main.bicep' = {
infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
lock: 'CanNotDelete'
tags: {
'hidden-title': 'This is visible in the resource name'
Env: 'test'
}
}
Expand Down
4 changes: 3 additions & 1 deletion modules/app/managed-environment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ module managedEnvironment './app/managed-environment/main.bicep' = {
skuName: 'Consumption'
tags: {
Env: 'test'
'hidden-title': 'This is visible in the resource name'
}
}
}
Expand Down Expand Up @@ -256,7 +257,8 @@ module managedEnvironment './app/managed-environment/main.bicep' = {
},
"tags": {
"value": {
"Env": "test"
"Env": "test",
"hidden-title": "This is visible in the resource name"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
{
name: 'defaultSubnet'
properties: {
addressPrefix: addressPrefix
addressPrefix: cidrSubnet(addressPrefix, 16, 0)
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ module testDeployment '../../main.bicep' = {
service: 'Webhook'
subnetResourceId: nestedDependencies.outputs.subnetResourceId
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand All @@ -115,6 +116,7 @@ module testDeployment '../../main.bicep' = {
service: 'DSCAndHybridWorker'
subnetResourceId: nestedDependencies.outputs.subnetResourceId
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand Down Expand Up @@ -239,6 +241,7 @@ module testDeployment '../../main.bicep' = {
}
]
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand Down
6 changes: 6 additions & 0 deletions modules/automation/automation-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ module automationAccount './automation/automation-account/main.bicep' = {
subnetResourceId: '<subnetResourceId>'
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
}
Expand All @@ -458,6 +459,7 @@ module automationAccount './automation/automation-account/main.bicep' = {
subnetResourceId: '<subnetResourceId>'
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
}
Expand Down Expand Up @@ -551,6 +553,7 @@ module automationAccount './automation/automation-account/main.bicep' = {
systemAssignedIdentity: true
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
userAssignedIdentities: {
Expand Down Expand Up @@ -667,6 +670,7 @@ module automationAccount './automation/automation-account/main.bicep' = {
"subnetResourceId": "<subnetResourceId>",
"tags": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
},
Expand All @@ -680,6 +684,7 @@ module automationAccount './automation/automation-account/main.bicep' = {
"subnetResourceId": "<subnetResourceId>",
"tags": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
}
Expand Down Expand Up @@ -785,6 +790,7 @@ module automationAccount './automation/automation-account/main.bicep' = {
"tags": {
"value": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
{
name: 'defaultSubnet'
properties: {
addressPrefix: addressPrefix
addressPrefix: cidrSubnet(addressPrefix, 16, 0)
}
}
]
Expand Down
2 changes: 2 additions & 0 deletions modules/batch/batch-account/.test/common/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ module testDeployment '../../main.bicep' = {
}
]
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand All @@ -100,6 +101,7 @@ module testDeployment '../../main.bicep' = {
storageAuthenticationMode: 'BatchAccountManagedIdentity'
systemAssignedIdentity: true
tags: {
'hidden-title': 'This is visible in the resource name'
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
{
name: 'defaultSubnet'
properties: {
addressPrefix: addressPrefix
addressPrefix: cidrSubnet(addressPrefix, 16, 0)
}
}
]
Expand Down
Loading