Skip to content

Commit 91eb56f

Browse files
marcelloromanimax-rocket-internet
authored andcommitted
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
1 parent 95d4e78 commit 91eb56f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ project adheres to [Semantic Versioning](http://semver.org/).
88
## [[v2.0.1](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v2.0.0...HEAD)] - 2019-01-??]
99

1010
### Added
11-
- Write your awesome addition here (by @you)
11+
12+
- Write your awesome addition here (by @you)
1213

1314
### Changed
14-
- Removed invalid action from worker_autoscaling iam policy
15+
16+
- Removed invalid action from worker_autoscaling iam policy (by @marcelloromani)
17+
- Fixed zsh-specific syntax in retry loop for aws auth config map (by @marcelloromani)
18+
- Fix: fail deployment if applying the aws auth config map still fails after 10 attempts (by @marcelloromani)
1519

1620
## [[v2.0.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.8.0...v2.0.0)] - 2018-12-14]
1721

aws_auth.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resource "null_resource" "update_config_map_aws_auth" {
88
depends_on = ["aws_eks_cluster.this"]
99

1010
provisioner "local-exec" {
11-
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"
11+
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"
1212
interpreter = ["${var.local_exec_interpreter}"]
1313
}
1414

0 commit comments

Comments
 (0)