diff --git a/castai/resource_node_configuration_eks_test.go b/castai/resource_node_configuration_eks_test.go index b50fa003..46955be7 100644 --- a/castai/resource_node_configuration_eks_test.go +++ b/castai/resource_node_configuration_eks_test.go @@ -47,6 +47,7 @@ func TestAccResourceNodeConfiguration_eks(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "eks.0.imds_v1", "true"), resource.TestCheckResourceAttr(resourceName, "eks.0.imds_hop_limit", "3"), resource.TestCheckResourceAttr(resourceName, "eks.0.volume_kms_key_arn", "arn:aws:kms:eu-central-1:012345:key/1d989ee1-59cd-4238-8018-79bae29d1109"), + resource.TestCheckResourceAttr(resourceName, "eks.0.target_group.#", "1"), resource.TestCheckResourceAttr(resourceName, "aks.#", "0"), resource.TestCheckResourceAttr(resourceName, "kops.#", "0"), resource.TestCheckResourceAttr(resourceName, "gke.#", "0"), @@ -125,6 +126,9 @@ resource "castai_node_configuration" "test" { volume_kms_key_arn = "arn:aws:kms:eu-central-1:012345:key/1d989ee1-59cd-4238-8018-79bae29d1109" imds_v1 = true imds_hop_limit = 3 + target_group = { + arn = aws_lb_target_group.test.arn + port = 80 } } diff --git a/examples/eks/eks_cluster_autoscaler_policies/castai.tf b/examples/eks/eks_cluster_autoscaler_policies/castai.tf index 8fca4f88..c0ddc1aa 100644 --- a/examples/eks/eks_cluster_autoscaler_policies/castai.tf +++ b/examples/eks/eks_cluster_autoscaler_policies/castai.tf @@ -78,6 +78,10 @@ module "castai-eks-cluster" { aws_security_group.additional.id, ] instance_profile_arn = module.castai-eks-role-iam.instance_profile_arn + target_group = { + arn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067" + port = 1000 + } } test_node_config = { @@ -98,6 +102,10 @@ module "castai-eks-cluster" { volume_iops = 3100 volume_throughput = 130 imds_v1 = true + target_group = { + arn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067" + port = 1000 + } } }