inspec-azure icon indicating copy to clipboard operation
inspec-azure copied to clipboard

azurerm_kubernetes_cluster_node_pool support

Open neilhwatson opened this issue 4 years ago • 2 comments

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.

neilhwatson avatar Dec 02 '20 15:12 neilhwatson

I also would like this. Apparently you can't just used second and so on, as it comes up as undefined method.

donwlewis avatar Dec 07 '20 18:12 donwlewis

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

donwlewis avatar Dec 07 '20 19:12 donwlewis