feat: Require users to supply OS via ami_type and not via platform which is unable to distinquish between the number of variants supported today (#3068)

This commit is contained in:
Bryant Biggs
2024-06-13 07:50:26 -04:00
committed by GitHub
parent c32cee1adc
commit ef657bfcb5
5 changed files with 13 additions and 8 deletions

View File

@@ -10,10 +10,16 @@ variable "tags" {
default = {}
}
# tflint-ignore: terraform_unused_declarations
variable "platform" {
description = "[DEPRECATED - use `ami_type` instead. Will be removed in `v21.0`] Identifies the OS platform as `bottlerocket`, `linux` (AL2), `al2023`, or `windows`"
description = "[DEPRECATED - must use `ami_type` instead. Will be removed in `v21.0`]"
type = string
default = "linux"
default = null
validation {
condition = var.platform == null
error_message = "`platform` is no longer valid due to the number of OS choices. Please provide an [`ami_type`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-amitype) instead."
}
}
################################################################################