Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The os_disk_type default value is not consistent with AKS default behaviour #261

Open
1 task done
zioproto opened this issue Sep 28, 2022 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@zioproto
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues

Greenfield/Brownfield provisioning

greenfield

Terraform Version

1.2.8

Module Version

6.0.0

AzureRM Provider Version

3.0.0

Affected Resource(s)/Data Source(s)

azurerm_kubernetes_cluster

Terraform Configuration Files

variable "os_disk_type" {
  type        = string
  description = "The type of disk which should be used for the Operating System. Possible values are `Ephemeral` and `Managed`. Defaults to `Managed`. Changing this forces a new resource to be created."
  default     = "Managed"
  nullable    = false
}

tfvars variables values

N/A

Debug Output/Panic Output

N/A

Expected Behaviour

The default value for os_disk_type should be Ephemeral.

https://learn.microsoft.com/en-us/azure/aks/cluster-configuration#ephemeral-os

Screenshot 2022-09-28 at 09 14 03

Actual Behaviour

The current default value is Managed
https://github.com/Azure/terraform-azurerm-aks/blob/master/variables.tf#L363

Steps to Reproduce

No response

Important Factoids

n/a

References

It is all about this variable
https://github.com/Azure/terraform-azurerm-aks/blob/master/variables.tf#L360

@zioproto zioproto added the bug Something isn't working label Sep 28, 2022
@zioproto
Copy link
Collaborator Author

@lonegunmanb this is a trivial patch, but it is also a change of default behaviour that triggers the cluster to be destroyed and recreated. It is very dangerous. I believe we should target this for 7.0.0 with a very visible release note.
What is your opinion on this ?

Thanks to @paolosalvatori that noticed this discrepancy in default behaviour between the AKS product and the Terraform Module.

@lonegunmanb
Copy link
Member

lonegunmanb commented Sep 29, 2022

Thanks @zioproto for opening this issue. According to azurerm_kubernetes_cluster's document, the os_disk_type's default value is Managed in Terraform AzureRM Provider, so I think it's ok to keep it in this module. As the downstream of Terraform Provider I think it's better to keep consist with Terraform Provider, because the Provider has low tolerance of breaking change, whilst API and portal are tend to change more frequently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants