inspec-azure
inspec-azure copied to clipboard
azurerm_kubernetes_cluster_node_pool support
Please provide support for testing azurerm_kubernetes_cluster_node_pool resources. In practice most AKS clusters will have multiple node pools and the current documentation only shows how to check the 'first' one.
I also would like this. Apparently you can't just used second
and so on, as it comes up as undefined method.
Since this is an array, this does appear to work:
describe azure_aks_cluster(resource_group: resource_group, name: aks_name).properties.agentPoolProfiles[1] do
its('name') { should eq 'pool2' }
its('count') { should eq 1 }
its('maxPods') { should eq 20 }
its('vmSize') { should eq 'Standard_DS3_v2' }
its('vnetSubnetID') { should eq subnet_id }
its('enableAutoScaling') { should eq true }
its('maxCount') { should eq 3 }
its('minCount') { should eq 1 }
its('type') { should eq 'VirtualMachineScaleSets' }
its('provisioningState') { should eq 'Succeeded' }
its('enableNodePublicIP') { should eq false }
its('osType') { should eq 'Linux' }
end