Without kubectl, it logs some errors but still succeeds. That makes it harder to fix the problem and re-apply the changes.
Run example without kubectl installed.
terraform apply should fail.
I double this.
In our CI environment we didn't have kubectl installed, so created cluster wasn't functional.
Yet job was still finishing with success.
This is CI guy worst nightmare :)
Here is the output:
module.eks_cluster.aws_security_group_rule.workers_ingress_cluster: Creation complete after 8s (ID: sgrule-1325689863)
module.eks_cluster.null_resource.update_config_map_aws_auth: Still creating... (20s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth (local-exec): /bin/sh: 64: kubectl: not found
module.eks_cluster.aws_autoscaling_group.workers: Still creating... (10s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth: Still creating... (30s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth (local-exec): /bin/sh: 64: kubectl: not found
module.eks_cluster.aws_autoscaling_group.workers: Still creating... (20s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth: Still creating... (40s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth (local-exec): /bin/sh: 64: kubectl: not found
module.eks_cluster.aws_autoscaling_group.workers: Still creating... (30s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth: Still creating... (50s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth (local-exec): /bin/sh: 64: kubectl: not found
module.eks_cluster.aws_autoscaling_group.workers: Still creating... (40s elapsed)
module.eks_cluster.aws_autoscaling_group.workers: Creation complete after 40s (ID: eks-02019042521314172370000000e)
module.eks_cluster.null_resource.update_config_map_aws_auth: Still creating... (1m0s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth (local-exec): /bin/sh: 64: kubectl: not found
module.eks_cluster.null_resource.update_config_map_aws_auth: Still creating... (1m10s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth (local-exec): /bin/sh: 64: kubectl: not found
module.eks_cluster.null_resource.update_config_map_aws_auth: Still creating... (1m20s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth (local-exec): /bin/sh: 64: kubectl: not found
module.eks_cluster.null_resource.update_config_map_aws_auth: Still creating... (1m30s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth (local-exec): /bin/sh: 64: kubectl: not found
module.eks_cluster.null_resource.update_config_map_aws_auth: Still creating... (1m40s elapsed)
module.eks_cluster.null_resource.update_config_map_aws_auth: Creation complete after 1m40s (ID: 6995365904878102443)
Apply complete! Resources: 35 added, 0 changed, 0 destroyed.
I'm guessing inline bash script here is not failing like it should:
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/aws_auth.tf
Cool, feel free to make a PR to fix.
Please retest with current master and reopen if required 馃檪
Most helpful comment
I double this.
In our CI environment we didn't have
kubectlinstalled, so created cluster wasn't functional.Yet job was still finishing with success.
This is CI guy worst nightmare :)
Here is the output:
I'm guessing inline bash script here is not failing like it should:
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/aws_auth.tf