Skip to content

Commit

Permalink
Force Agent pool type as VMSS
Browse files Browse the repository at this point in the history
  • Loading branch information
titilambert committed Oct 24, 2019
1 parent 8a45456 commit 7a87418
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 3 additions & 7 deletions azurerm/resource_arm_kubernetes_cluster_agent_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@ func resourceArmKubernetesClusterAgentPool() *schema.Resource {
"agent_pool_type": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Default: string(containerservice.AvailabilitySet),
ValidateFunc: validation.StringInSlice([]string{
string(containerservice.AvailabilitySet),
string(containerservice.VirtualMachineScaleSets),
}, false),
Computed: true,
},

"orchestrator_version": {
Expand Down Expand Up @@ -343,7 +338,8 @@ func resourceArmKubernetesClusterAgentPoolDelete(d *schema.ResourceData, meta in

func expandKubernetesClusterAgentPoolProfileProperties(d *schema.ResourceData) (containerservice.ManagedClusterAgentPoolProfileProperties, error) {
// TODO Default: AvailabilitySet ??
poolType := d.Get("agent_pool_type").(string)
poolType := string(containerservice.VirtualMachineScaleSets)

// TODO Default Linux ???
osType := d.Get("os_type").(string)
vmSize := d.Get("vm_size").(string)
Expand Down
1 change: 0 additions & 1 deletion azurerm/resource_arm_kubernetes_cluster_agent_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ resource "azurerm_kubernetes_cluster_agent_pool" "linux2" {
name = azurerm_kubernetes_cluster.test.name
resource_group_name = azurerm_resource_group.test.name
agent_pool_type = "VirtualMachineScaleSets"
os_type = "Linux"
vm_size = "Standard_DS2_v2"
node_count = 1
Expand Down

0 comments on commit 7a87418

Please sign in to comment.