Skip to content

Commit

Permalink
Add AKS os disk type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
apasyniuk committed Dec 14, 2023
1 parent 62affe9 commit 5fd7481
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions castai/resource_node_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ func resourceNodeConfiguration() *schema.Resource {
ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(10, 250)),
Description: "Maximum number of pods that can be run on a node, which affects how many IP addresses you will need for each node. Defaults to 30",
},
"os_disk_type": {
Type: schema.TypeString,
Optional: true,
Description: "Type of managed os disk attached to the node. (See [disk types](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types)). One of: standard, standard-ssd, premium-ssd (ultra and premium-ssd-v2 are not supported for os disk)",
ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"standard", "standard-ssd", "premium-ssd"}, false)),
},
},
},
},
Expand Down Expand Up @@ -667,6 +673,10 @@ func toAKSSConfig(obj map[string]interface{}) *sdk.NodeconfigV1AKSConfig {
out.MaxPodsPerNode = toPtr(int32(v))
}

if v, ok := obj["os_disk_type"].(string); ok && v != "" {
out.OsDiskType = toPtr(v)

Check failure on line 677 in castai/resource_node_configuration.go

View workflow job for this annotation

GitHub Actions / Build

out.OsDiskType undefined (type *sdk.NodeconfigV1AKSConfig has no field or method OsDiskType)
}

return out
}

Expand Down
3 changes: 2 additions & 1 deletion castai/sdk/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5fd7481

Please sign in to comment.