aws-samples / eks-workshop-v2

Hands-on labs for Amazon EKS
https://www.eksworkshop.com
Apache License 2.0
366 stars 374 forks source link

[Bug]: old trident operator in use on addon.tf file. #872

Open idoshoy opened 3 months ago

idoshoy commented 3 months ago

Installation method

Own AWS account

What happened?

Error: creating EKS Add-On (eks-workshop:netapp_trident-operator): operation error EKS: CreateAddon, https response error StatusCode: 400, RequestID: *****, InvalidParameterException: Addon netapp_trident-operator specified is not supported in 1.29 kubernetes version │ │ with aws_eks_addon.fsxn_csi_addon, │ on addon.tf line 1, in resource "aws_eks_addon" "fsxn_csi_addon": │ 1: resource "aws_eks_addon" "fsxn_csi_addon" { │ ╵ ╷ │ Error: creating FSx for NetApp ONTAP File System: BadRequest: Provided FsxAdminPassword is not valid. Passwords must be between 8 and 128 characters in length, must contain at least one English letter and one number, and must not contain the word 'admin'. │ │ with aws_fsx_ontap_file_system.fsxnassets, │ on addon.tf line 39, in resource "aws_fsx_ontap_file_system" "fsxnassets": │ 39: resource "aws_fsx_ontap_file_system" "fsxnassets" {

What did you expect to happen?

To create the lab

How can we reproduce it?

use "prepare-environment fundamentals/storage/fsxn"

Anything else we need to know?

No response

EKS version

1.29

davivcgarcia commented 3 months ago

This is because the latest EKS Add-on for NetApp Trident within the AWS Marketplace is version 23.10.0, while only the release v24.02.0 introduced support for Kubernetes 1.29.

https://github.com/NetApp/trident/releases/tag/v24.02.0

Full log here:

Creating infrastructure for next lab...

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/random...
- Finding hashicorp/helm versions matching "2.9.0"...
- Finding gavinbunney/kubectl versions matching ">= 1.14.0"...
- Finding hashicorp/local versions matching "~> 2.1"...
- Finding hashicorp/kubernetes versions matching ">= 2.10.0"...
- Finding latest version of hashicorp/aws...
- Using previously-installed hashicorp/helm v2.9.0
- Using previously-installed gavinbunney/kubectl v1.14.0
- Using previously-installed hashicorp/local v2.5.1
- Using previously-installed hashicorp/kubernetes v2.27.0
- Using previously-installed hashicorp/aws v5.42.0
- Installing hashicorp/random v3.6.0...
- Installed hashicorp/random v3.6.0 (signed by HashiCorp)

Terraform has made some changes to the provider dependency selections recorded
in the .terraform.lock.hcl file. Review those changes and commit them to your
version control system if they represent changes you intended to make.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
data.aws_caller_identity.current: Reading...
data.aws_eks_cluster.eks_cluster: Reading...
data.aws_region.current: Reading...
data.aws_partition.current: Reading...
data.aws_eks_cluster_auth.this: Reading...
data.aws_eks_cluster_auth.this: Read complete after 0s [id=eks-workshop]
data.aws_region.current: Read complete after 0s [id=us-west-2]
data.aws_partition.current: Read complete after 0s [id=aws]
data.aws_caller_identity.current: Read complete after 0s [id=627696560500]
data.aws_eks_cluster.eks_cluster: Read complete after 0s [id=eks-workshop]
data.aws_vpc.selected_vpc_fsx: Reading...
data.aws_subnets.private_subnets_fsx: Reading...
data.aws_subnets.private_subnets_fsx: Read complete after 0s [id=us-west-2]
data.aws_vpc.selected_vpc_fsx: Read complete after 0s [id=vpc-04cb61fcbd29e682f]
data.aws_route_table.private[1]: Reading...
data.aws_route_table.private[0]: Reading...
data.aws_route_table.private[2]: Reading...
data.aws_route_table.private[1]: Read complete after 0s [id=rtb-040ad010e8c095c21]
data.aws_route_table.private[2]: Read complete after 0s [id=rtb-0f72ec94f67e53e59]
data.aws_route_table.private[0]: Read complete after 0s [id=rtb-0caafeef5a2553de3]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_eks_addon.fsxn_csi_addon will be created
  + resource "aws_eks_addon" "fsxn_csi_addon" {
      + addon_name           = "netapp_trident-operator"
      + addon_version        = "v23.10.0-eksbuild.1"
      + arn                  = (known after apply)
      + cluster_name         = "eks-workshop"
      + configuration_values = (known after apply)
      + created_at           = (known after apply)
      + id                   = (known after apply)
      + modified_at          = (known after apply)
      + tags_all             = (known after apply)
    }

  # aws_fsx_ontap_file_system.fsxnassets will be created
  + resource "aws_fsx_ontap_file_system" "fsxnassets" {
      + arn                               = (known after apply)
      + automatic_backup_retention_days   = 0
      + daily_automatic_backup_start_time = (known after apply)
      + deployment_type                   = "MULTI_AZ_1"
      + dns_name                          = (known after apply)
      + endpoint_ip_address_range         = (known after apply)
      + endpoints                         = (known after apply)
      + fsx_admin_password                = (sensitive value)
      + ha_pairs                          = (known after apply)
      + id                                = (known after apply)
      + kms_key_id                        = (known after apply)
      + network_interface_ids             = (known after apply)
      + owner_id                          = (known after apply)
      + preferred_subnet_id               = "subnet-0ffd9dcef58465ac4"
      + route_table_ids                   = [
          + "rtb-040ad010e8c095c21",
          + "rtb-0caafeef5a2553de3",
          + "rtb-0f72ec94f67e53e59",
        ]
      + security_group_ids                = (known after apply)
      + storage_capacity                  = 2048
      + storage_type                      = "SSD"
      + subnet_ids                        = [
          + "subnet-0ffd9dcef58465ac4",
          + "subnet-082d8377a2e5cccce",
        ]
      + tags                              = {
          + "Name"       = "eks-workshop-fsxn-assets"
          + "created-by" = "eks-workshop-v2"
          + "env"        = "eks-workshop"
        }
      + tags_all                          = {
          + "Name"       = "eks-workshop-fsxn-assets"
          + "created-by" = "eks-workshop-v2"
          + "env"        = "eks-workshop"
        }
      + throughput_capacity               = 512
      + vpc_id                            = (known after apply)
      + weekly_maintenance_start_time     = (known after apply)
    }

  # aws_fsx_ontap_storage_virtual_machine.fsxnsvm will be created
  + resource "aws_fsx_ontap_storage_virtual_machine" "fsxnsvm" {
      + arn            = (known after apply)
      + endpoints      = (known after apply)
      + file_system_id = (known after apply)
      + id             = (known after apply)
      + name           = "fsxnsvm"
      + subtype        = (known after apply)
      + tags_all       = (known after apply)
      + uuid           = (known after apply)
    }

  # aws_security_group.fsxn will be created
  + resource "aws_security_group" "fsxn" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = (known after apply)
      + name_prefix            = "security group for fsx access"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + tags                   = {
          + "Name"       = "eks-workshop-fsxnsecuritygroup"
          + "created-by" = "eks-workshop-v2"
          + "env"        = "eks-workshop"
        }
      + tags_all               = {
          + "Name"       = "eks-workshop-fsxnsecuritygroup"
          + "created-by" = "eks-workshop-v2"
          + "env"        = "eks-workshop"
        }
      + vpc_id                 = "vpc-04cb61fcbd29e682f"
    }

  # aws_security_group_rule.fsxn_inbound will be created
  + resource "aws_security_group_rule" "fsxn_inbound" {
      + cidr_blocks              = [
          + "10.42.0.0/16",
        ]
      + description              = "allow inbound traffic to eks"
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + security_group_rule_id   = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "ingress"
    }

  # aws_security_group_rule.fsxn_outbound will be created
  + resource "aws_security_group_rule" "fsxn_outbound" {
      + cidr_blocks              = [
          + "10.42.0.0/16",
        ]
      + description              = "allow outbound traffic to anywhere"
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + security_group_rule_id   = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # random_string.fsx_password will be created
  + resource "random_string" "fsx_password" {
      + id          = (known after apply)
      + length      = 10
      + lower       = true
      + min_lower   = 0
      + min_numeric = 0
      + min_special = 0
      + min_upper   = 0
      + number      = true
      + numeric     = true
      + result      = (known after apply)
      + special     = false
      + upper       = true
    }

Plan: 7 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + environment = (known after apply)
random_string.fsx_password: Creating...
random_string.fsx_password: Creation complete after 0s [id=ckLExUiMDr]
aws_eks_addon.fsxn_csi_addon: Creating...
aws_security_group.fsxn: Creating...
aws_security_group.fsxn: Creation complete after 2s [id=sg-03dd40e2f4d7c7c64]
aws_security_group_rule.fsxn_outbound: Creating...
aws_security_group_rule.fsxn_inbound: Creating...
aws_fsx_ontap_file_system.fsxnassets: Creating...
aws_security_group_rule.fsxn_outbound: Creation complete after 0s [id=sgrule-995316454]
aws_security_group_rule.fsxn_inbound: Creation complete after 1s [id=sgrule-3334093034]
╷
│ Error: creating EKS Add-On (eks-workshop:netapp_trident-operator): operation error EKS: CreateAddon, https response error StatusCode: 400, RequestID: 5698badc-2da5-4d81-a95b-bee9194d9e59, InvalidParameterException: Addon netapp_trident-operator specified is not supported in 1.29 kubernetes version
│ 
│   with aws_eks_addon.fsxn_csi_addon,
│   on addon.tf line 1, in resource "aws_eks_addon" "fsxn_csi_addon":
│    1: resource "aws_eks_addon" "fsxn_csi_addon" {
│ 
╵
╷
│ Error: creating FSx for NetApp ONTAP File System: BadRequest: Provided FsxAdminPassword is not valid. Passwords must be between 8 and 128 characters in length, must contain at least one English letter and one number, and must not contain the word 'admin'.
│ 
│   with aws_fsx_ontap_file_system.fsxnassets,
│   on addon.tf line 39, in resource "aws_fsx_ontap_file_system" "fsxnassets":
│   39: resource "aws_fsx_ontap_file_system" "fsxnassets" {
│ 
╵
An error occurred, please contact your workshop proctor or raise an issue at https://github.com/aws-samples/eks-workshop-v2/issues