Skip to content
Open
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,12 @@ The following inputs can be used as `step.with` keys
| `aws_eks_cluster_log_types` | String | Comma separated list of cluster log type. See [this AWS doc](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html). Defaults to `api,audit,authenticator`. |
| `aws_eks_cluster_log_retention_days` | String | Days to store logs. Defaults to `7`. |
| `aws_eks_cluster_logs_skip_destroy` | Boolean | Skip deletion of cluster logs if set to true. Defaults to `false`. |
| `aws_eks_cluster_version` | String | Specify the k8s cluster version. Defaults to `1.28` |
| `aws_eks_cluster_version` | String | Specify the k8s cluster version. Defaults to `1.32` |
| `aws_eks_create_bk_node_group` | Boolean | Creates a backup node group in order to migrate the main one. Any changes after creation of it will be ignored. (For safety reasons) |
| `aws_eks_instance_type` | String | Define the EC2 instance type. See [this list](https://aws.amazon.com/ec2/instance-types/) for reference. Defaults to `t3a.medium`. |
| `aws_eks_instance_ami_id` | String | AWS AMI ID. Will default to the latest Amazon EKS Node image for the cluster version. |
| `aws_eks_instance_ami_type` | String | AWS AMI ID. Will default to the latest Amazon EKS Node image for the cluster version. See [here](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for options. Defaults to `AL2_x86_64.` (Legacy reasons)|
| `aws_eks_instance_type_bk` | String | Same as above, but for backup node-group. Will use the same as the main node-group if not defined. If set, should be defined at the same time the node-group get's created. |
| `aws_eks_instance_ami_type_bk` | String | Same as above, but for backup node-group. Will use the same as the main node-group if not defined. If set, should be defined at the same time the node-group get's created. |
| `aws_eks_instance_user_data_file` | String | Relative path in the repo for a user provided script to be executed with the EC2 Instance creation. See note. |
| `aws_eks_ec2_key_pair` | String | Enter an existing ec2 key pair name for worker nodes. If none, will create one. |
| `aws_eks_store_keypair_sm` | Boolean | If true, will store the newly created keys in Secret Manager. |
Expand Down
22 changes: 17 additions & 5 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,21 @@ inputs:
required: false
aws_eks_cluster_version:
description: 'Specify the k8s cluster version'
required: false
required: false
aws_eks_create_bk_node_group:
description: 'Create a backup node group'
required: false
aws_eks_instance_type:
description: 'enter the aws instance type'
required: false
aws_eks_instance_ami_id:
description: 'AWS AMI ID. Will default to the latest Amazon EKS Node image for the cluster version.'
aws_eks_instance_ami_type:
description: 'Type of AMI to use. Defaults to AL2_x86_64'
required: false
aws_eks_instance_type_bk:
description: 'enter the aws instance type'
required: false
aws_eks_instance_ami_type_bk:
description: 'Type of AMI to use. Defaults to AL2_x86_64'
required: false
aws_eks_instance_user_data_file:
description: 'Relative path in the repo for a user provided script to be executed with Terraform EKS Node creation.'
Expand Down Expand Up @@ -1561,7 +1570,7 @@ runs:
AWS_ECR_REGISTRY_POLICY_INPUT: ${{ inputs.aws_ecr_registry_policy_input }}
AWS_ECR_ADDITIONAL_TAGS: ${{ inputs.aws_ecr_additional_tags }}

# AWS EKS
# EKS
AWS_EKS_CREATE: ${{ inputs.aws_eks_create }}
AWS_EKS_SECURITY_GROUP_NAME_CLUSTER: ${{ inputs.aws_eks_security_group_name_cluster }}
AWS_EKS_SECURITY_GROUP_NAME_NODE: ${{ inputs.aws_eks_security_group_name_node }}
Expand All @@ -1575,8 +1584,11 @@ runs:
AWS_EKS_CLUSTER_LOG_RETENTION_DAYS: ${{ inputs.aws_eks_cluster_log_retention_days }}
AWS_EKS_CLUSTER_LOG_SKIP_DESTROY: ${{ inputs.aws_eks_cluster_log_skip_destroy }}
AWS_EKS_CLUSTER_VERSION: ${{ inputs.aws_eks_cluster_version }}
AWS_EKS_CREATE_BK_NODE_GROUP: ${{ inputs.aws_eks_create_bk_node_group }}
AWS_EKS_INSTANCE_TYPE: ${{ inputs.aws_eks_instance_type }}
AWS_EKS_INSTANCE_AMI_ID: ${{ inputs.aws_eks_instance_ami_id }}
AWS_EKS_INSTANCE_AMI_TYPE: ${{ inputs.aws_eks_instance_ami_type }}
AWS_EKS_INSTANCE_TYPE_BK: ${{ inputs.aws_eks_instance_type_bk }}
AWS_EKS_INSTANCE_AMI_TYPE_BK: ${{ inputs.aws_eks_instance_ami_type_bk }}
AWS_EKS_INSTANCE_USER_DATA_FILE: ${{ inputs.aws_eks_instance_user_data_file }}
AWS_EKS_EC2_KEY_PAIR: ${{ inputs.aws_eks_ec2_key_pair }}
AWS_EKS_STORE_KEYPAIR_SM: ${{ inputs.aws_eks_store_keypair_sm }}
Expand Down
10 changes: 8 additions & 2 deletions operations/_scripts/generate/generate_vars_terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,11 @@ if [[ $(alpha_only "$AWS_EKS_CREATE") == true ]]; then
aws_eks_cluster_log_retention_days=$(generate_var aws_eks_cluster_log_retention_days $AWS_EKS_CLUSTER_LOG_RETENTION_DAYS)
aws_eks_cluster_log_skip_destroy=$(generate_var aws_eks_cluster_log_skip_destroy $AWS_EKS_CLUSTER_LOG_SKIP_DESTROY)
aws_eks_cluster_version=$(generate_var aws_eks_cluster_version $AWS_EKS_CLUSTER_VERSION)
aws_eks_create_bk_node_group=$(generate_var aws_eks_create_bk_node_group $AWS_EKS_CREATE_BK_NODE_GROUP)
aws_eks_instance_type=$(generate_var aws_eks_instance_type $AWS_EKS_INSTANCE_TYPE)
aws_eks_instance_ami_id=$(generate_var aws_eks_instance_ami_id $AWS_EKS_INSTANCE_AMI_ID)
aws_eks_instance_ami_type=$(generate_var aws_eks_instance_ami_type $AWS_EKS_INSTANCE_AMI_TYPE)
aws_eks_instance_type_bk=$(generate_var aws_eks_instance_type_bk $AWS_EKS_INSTANCE_TYPE_BK)
aws_eks_instance_ami_type_bk=$(generate_var aws_eks_instance_ami_type_bk $AWS_EKS_INSTANCE_AMI_TYPE_BK)
aws_eks_instance_user_data_file=$(generate_var aws_eks_instance_user_data_file $AWS_EKS_INSTANCE_USER_DATA_FILE)
aws_eks_ec2_key_pair=$(generate_var aws_eks_ec2_key_pair $AWS_EKS_EC2_KEY_PAIR)
aws_eks_store_keypair_sm=$(generate_var aws_eks_store_keypair_sm $AWS_EKS_STORE_KEYPAIR_SM)
Expand Down Expand Up @@ -767,8 +770,11 @@ $aws_eks_cluster_log_types
$aws_eks_cluster_log_retention_days
$aws_eks_cluster_log_skip_destroy
$aws_eks_cluster_version
$aws_eks_create_bk_node_group
$aws_eks_instance_type
$aws_eks_instance_ami_id
$aws_eks_instance_ami_type
$aws_eks_instance_type_bk
$aws_eks_instance_ami_type_bk
$aws_eks_instance_user_data_file
$aws_eks_ec2_key_pair
$aws_eks_store_keypair_sm
Expand Down
48 changes: 33 additions & 15 deletions operations/deployment/terraform/aws/aws_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ variable "aws_ec2_port_list" {
default = ""
}

variable "aws_ec2_user_data_replace_on_change" {
variable "aws_ec2_user_data_replace_on_change" {
type = bool
description = "Forces destruction of EC2 instance"
default = true
Expand All @@ -145,21 +145,21 @@ variable "aws_vpc_create" {
}

variable "aws_vpc_name" {
type = string
type = string
description = "Name for the aws vpc"
default = ""
default = ""
}

variable "aws_vpc_id" {
type = string
type = string
description = "aws vpc id"
default = ""
default = ""
}

variable "aws_vpc_subnet_id" {
type = string
type = string
description = "aws vpc subnet id"
default = ""
default = ""
}

variable "aws_vpc_cidr_block" {
Expand Down Expand Up @@ -1602,13 +1602,13 @@ variable "aws_ecs_additional_tags" {
}

# ECR
variable "aws_ecr_repo_create" {
variable "aws_ecr_repo_create" {
description = "Determines whether a repository will be created"
type = bool
default = false
}

variable "aws_ecr_repo_type" {
variable "aws_ecr_repo_type" {
description = "The type of repository to create. Either `public` or `private`"
type = string
default = "private"
Expand Down Expand Up @@ -1736,7 +1736,7 @@ variable "aws_ecr_public_repo_catalog" {
default = {}
}

variable "aws_ecr_registry_policy_input" {
variable "aws_ecr_registry_policy_input" {
description = "The policy document. This is a JSON formatted string"
type = string
default = ""
Expand Down Expand Up @@ -1809,7 +1809,7 @@ variable "aws_eks_cluster_log_types" {
}

variable "aws_eks_cluster_log_retention_days" {
description = "enter the kubernetes version"
description = "Log retention days"
type = string
default = "7"
}
Expand All @@ -1822,8 +1822,14 @@ variable "aws_eks_cluster_log_skip_destroy" {

variable "aws_eks_cluster_version" {
description = "enter the kubernetes version"
type = number
default = "1.28"
type = string
default = 1.28
}

variable "aws_eks_create_bk_node_group" {
description = "create a backup node group"
type = bool
default = false
}

variable "aws_eks_instance_type" {
Expand All @@ -1832,8 +1838,20 @@ variable "aws_eks_instance_type" {
default = "t3a.medium"
}

variable "aws_eks_instance_ami_id" {
description = "AWS AMI ID"
variable "aws_eks_instance_type_bk" {
description = "enter the aws instance type"
type = string
default = ""
}

variable "aws_eks_instance_ami_type" {
description = "Type of AMI to use. Defaults to AL2_x86_64"
type = string
default = "AL2_x86_64"
}

variable "aws_eks_instance_ami_type_bk" {
description = "Type of AMI to use. Defaults to AL2_x86_64"
type = string
default = ""
}
Expand Down
Loading