From c57db140f8fe5b36c71d9a02c9ab70ba3a0e10b9 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Tue, 29 Mar 2022 22:40:23 +0000 Subject: [PATCH] EKS: EncryptionConfig should be an empty list by default (#4986) --- moto/eks/models.py | 2 +- tests/terraform-tests.success.txt | 1 + tests/test_eks/test_eks_constants.py | 1 + tests/test_eks/test_server.py | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/moto/eks/models.py b/moto/eks/models.py index 89fff7930..546dd7e8b 100644 --- a/moto/eks/models.py +++ b/moto/eks/models.py @@ -113,7 +113,7 @@ class Cluster: encryption_config=None, ): if encryption_config is None: - encryption_config = dict() + encryption_config = [] if tags is None: tags = dict() diff --git a/tests/terraform-tests.success.txt b/tests/terraform-tests.success.txt index f38e86578..dd24331e6 100644 --- a/tests/terraform-tests.success.txt +++ b/tests/terraform-tests.success.txt @@ -75,6 +75,7 @@ TestAccAWSEcrRepositoryPolicy TestAccAWSEFSAccessPoint TestAccAWSEFSMountTarget TestAccAWSEgressOnlyInternetGateway +TestAccAWSEksClusterDataSource TestAccAWSElasticBeanstalkSolutionStackDataSource TestAccAWSELBAttachment TestAccAWSElbHostedZoneId diff --git a/tests/test_eks/test_eks_constants.py b/tests/test_eks/test_eks_constants.py index 5b7dd2195..2719aece7 100644 --- a/tests/test_eks/test_eks_constants.py +++ b/tests/test_eks/test_eks_constants.py @@ -176,6 +176,7 @@ class ClusterAttributes: ISSUER = "issuer" NAME = "name" OIDC = "oidc" + ENCRYPTION_CONFIG = "encryptionConfig" class FargateProfileAttributes: diff --git a/tests/test_eks/test_server.py b/tests/test_eks/test_server.py index b83ca3e37..1c65ff4a8 100644 --- a/tests/test_eks/test_server.py +++ b/tests/test_eks/test_server.py @@ -274,6 +274,7 @@ def test_eks_describe_existing_cluster(test_client, create_cluster): response.status_code.should.equal(StatusCodes.OK) result_data[ClusterAttributes.NAME].should.equal(TestCluster.cluster_name) + result_data[ClusterAttributes.ENCRYPTION_CONFIG].should.equal([]) all_arn_values_should_be_valid( expected_arn_values=TestCluster.expected_arn_values, pattern=RegExTemplates.CLUSTER_ARN,