Fix zsh-specific syntax in retry loop within null_resource.update_config_map_aws_auth (#245)

* Fixed zsh-specific syntax, fail if kubectl apply fails after 10 attempts

* Updated CHANGELOG
This commit is contained in:
Marcello Romani
2019-01-15 11:11:24 +00:00
committed by Max Williams
parent 95d4e78f2f
commit 91eb56f4aa
2 changed files with 7 additions and 3 deletions

View File

@@ -8,10 +8,14 @@ project adheres to [Semantic Versioning](http://semver.org/).
## [[v2.0.1](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v2.0.0...HEAD)] - 2019-01-??]
### Added
- Write your awesome addition here (by @you)
- Write your awesome addition here (by @you)
### Changed
- Removed invalid action from worker_autoscaling iam policy
- Removed invalid action from worker_autoscaling iam policy (by @marcelloromani)
- Fixed zsh-specific syntax in retry loop for aws auth config map (by @marcelloromani)
- Fix: fail deployment if applying the aws auth config map still fails after 10 attempts (by @marcelloromani)
## [[v2.0.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.8.0...v2.0.0)] - 2018-12-14]

View File

@@ -8,7 +8,7 @@ resource "null_resource" "update_config_map_aws_auth" {
depends_on = ["aws_eks_cluster.this"]
provisioner "local-exec" {
command = "for i in {1..5}; do kubectl apply -f ${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}kubeconfig_${var.cluster_name} && break || sleep 10; done"
command = "for i in `seq 1 10`; do kubectl apply -f ${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}kubeconfig_${var.cluster_name} && exit 0 || sleep 10; done; exit 1"
interpreter = ["${var.local_exec_interpreter}"]
}