Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
6f65844
Updated NetApp to new dependency approach
AlexanderSehr Sep 4, 2022
30bb185
Added netapp delegation
AlexanderSehr Sep 4, 2022
118f655
Merge branch 'main' into users/alsehr/1791_NetApp_netAppAccounts
AlexanderSehr Sep 9, 2022
477c290
Update to latest
AlexanderSehr Sep 9, 2022
faef9a2
Update to latest
AlexanderSehr Sep 9, 2022
c3fbbb7
Update modules/Microsoft.NetApp/netAppAccounts/.test/min/deploy.test.…
AlexanderSehr Sep 19, 2022
19e1687
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs41/deploy.tes…
AlexanderSehr Sep 19, 2022
4e866a5
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs3/deploy.test…
AlexanderSehr Sep 19, 2022
16b660a
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs3/deploy.test…
AlexanderSehr Oct 12, 2022
3434088
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs3/deploy.test…
AlexanderSehr Oct 12, 2022
ec9fab4
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs3/deploy.test…
AlexanderSehr Oct 12, 2022
fcfe596
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs41/deploy.tes…
AlexanderSehr Oct 12, 2022
ab34cfc
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs41/deploy.tes…
AlexanderSehr Oct 12, 2022
20697a2
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs41/deploy.tes…
AlexanderSehr Oct 12, 2022
55c073b
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs41/deploy.tes…
AlexanderSehr Oct 12, 2022
4093bf5
Update modules/Microsoft.NetApp/netAppAccounts/.test/nfs3/deploy.test…
AlexanderSehr Oct 12, 2022
fb01c26
Updated readme
AlexanderSehr Oct 12, 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
3 changes: 1 addition & 2 deletions .github/workflows/ms.netapp.netappaccounts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ jobs:
- name: 'Using test file [${{ matrix.moduleTestFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}'
templateFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}'
location: '${{ env.location }}'
resourceGroupName: '${{ env.resourceGroupName }}'
subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@description('Optional. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string = 'ms.netapp.netappaccounts-${serviceShort}-rg'

@description('Optional. The location to deploy resources to.')
param location string = deployment().location

@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
param serviceShort string = 'nanaamin'

// =========== //
// Deployments //
// =========== //

// General resources
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
}

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@description('Optional. The location to deploy to.')
param location string = resourceGroup().location

@description('Required. The name of the Virtual Network to create.')
param virtualNetworkName string

@description('Required. The name of the Managed Identity to create.')
param managedIdentityName string

resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-01-01' = {
name: virtualNetworkName
location: location
properties: {
addressSpace: {
addressPrefixes: [
'10.0.0.0/24'
]
}
subnets: [
{
name: 'defaultSubnet'
properties: {
addressPrefix: '10.0.0.0/24'
delegations: [
{
name: 'netappDel'
properties: {
serviceName: 'Microsoft.Netapp/volumes'
}
}
]
}
}
]
}
}

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
name: managedIdentityName
location: location
}

@description('The resource ID of the created Virtual Network Subnet.')
output subnetResourceId string = virtualNetwork.properties.subnets[0].id

@description('The principal ID of the created Managed Identity.')
output managedIdentityPrincipalId string = managedIdentity.properties.principalId
128 changes: 128 additions & 0 deletions modules/Microsoft.NetApp/netAppAccounts/.test/nfs3/deploy.test.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@description('Optional. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string = 'ms.netapp.netappaccounts-${serviceShort}-rg'

@description('Optional. The location to deploy resources to.')
param location string = deployment().location

@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
param serviceShort string = 'nanaanfs3'

// =========== //
// Deployments //
// =========== //

// General resources
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
}

module resourceGroupResources 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
virtualNetworkName: 'dep-<<namePrefix>>-vnet-${serviceShort}'
managedIdentityName: 'dep-<<namePrefix>>-msi-${serviceShort}'
}
}

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
capacityPools: [
{
name: '<<namePrefix>>-${serviceShort}-cp-001'
roleAssignments: [
{
principalIds: [
resourceGroupResources.outputs.managedIdentityPrincipalId
]
roleDefinitionIdOrName: 'Reader'
}
]
serviceLevel: 'Premium'
size: 4398046511104
volumes: [
{
exportPolicyRules: [
{
allowedClients: '0.0.0.0/0'
nfsv3: true
nfsv41: false
ruleIndex: 1
unixReadOnly: false
unixReadWrite: true
}
]
name: '<<namePrefix>>-${serviceShort}-vol-001'
protocolTypes: [
'NFSv3'
]
roleAssignments: [
{
principalIds: [
resourceGroupResources.outputs.managedIdentityPrincipalId
]
roleDefinitionIdOrName: 'Reader'
}
]
subnetResourceId: resourceGroupResources.outputs.subnetResourceId
usageThreshold: 107374182400
}
{
name: '<<namePrefix>>-${serviceShort}-vol-002'
protocolTypes: [
'NFSv3'
]
subnetResourceId: resourceGroupResources.outputs.subnetResourceId
usageThreshold: 107374182400
}
]
}
{
name: '<<namePrefix>>-${serviceShort}-cp-002'
roleAssignments: [
{
principalIds: [
resourceGroupResources.outputs.managedIdentityPrincipalId
]
roleDefinitionIdOrName: 'Reader'
}
]
serviceLevel: 'Premium'
size: 4398046511104
volumes: []
}
]
lock: 'CanNotDelete'
roleAssignments: [
{
principalIds: [
resourceGroupResources.outputs.managedIdentityPrincipalId
]
roleDefinitionIdOrName: 'Reader'
}
]
tags: {
Contact: 'test.user@testcompany.com'
CostCenter: '7890'
Environment: 'Non-Prod'
PurchaseOrder: '1234'
Role: 'DeploymentValidation'
ServiceName: 'DeploymentValidation'
}
}
}
Loading