From ff9f019f907611bf8d1dd1cae57ed2e5df788792 Mon Sep 17 00:00:00 2001 From: Jaroslav Keznikl Date: Thu, 23 Apr 2020 15:42:50 +0200 Subject: [PATCH 1/3] Wrap local.configmap_roles.groups with tolist() in order to avoid golang panic. Wrap local.configmap_roles.groups with tolist() in order to avoid golang panic. Without this I get the following: ``` panic: inconsistent list element types (cty.Object(map[string]cty.Type{"groups":cty.DynamicPseudoType, "rolearn":cty.String, "username":cty.String}) then cty.Object(map[string]cty.Type{"groups":cty.Tuple([]cty.Type{cty.String, cty.String}), "rolearn":cty.String, "username":cty.String})) ``` It is caused by the ternary operator ( X ? Y : Z) in conjunction with distinct(). tolist(...) resolves the type. --- .aws_auth.tf.swp | Bin 0 -> 12288 bytes aws_auth.tf | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .aws_auth.tf.swp diff --git a/.aws_auth.tf.swp b/.aws_auth.tf.swp new file mode 100644 index 0000000000000000000000000000000000000000..fdc2599dd3180dd72207e8c05c0f44daccbeceb2 GIT binary patch literal 12288 zcmeI2&5ImG7{)7tpPQ&e1anH+yM$fI_I_wW7zn|vf*Lm@N<VMp2nwEzPxy-r*Zqur_wM_zT>JGnd+{;GI`TCYcM@v3>GjN+vg7RX>2nLm z{3H#<*g>yX0q2&|NX{9lwP>ZfJ1f@nS=q_wa1TUbF8Zc*)91NHr+`ynFA5xBk1j6E z)5uBhVgA6u3wsIT#yAC>0!{&^fK$LJ;1qBQI0c*nx2OUp+sC$$`)yVJ=d1g^k$d&4 zyEz4%0!{&^fK$LJ;1qBQI0c*nP64NYQ@|;33o0NY#@@P}u|MuW^7#LM{rCS*_c3-2 zTm{?U1Mn31;$Fr+0xj_80miO_U%(IGYw$7Xfi^e}d@v2Bz$BOem-jPv3>*eGCK!7g zYykr#XoAy#gZ<#=dlt90EIcGxj_94SWXP04?w`XaEi#1lxBp z_7%7cJ_nzIPr#etS#StE1SY`Fos9hmz6aajOYk9h2fPYi0_VXQa2V`B#~Xn3yiS_B z%PHU#a0)mD{$m9;8RrD&U6DN=hH0Tp&QJ0U(M_ZZaU^YeO=usDfv8$%>h2eEsdE}S zwtGRXW#95A=QH&O&g-B$O=N!5Mx;pgl$;-?suj2CnY)^!I5)8h%{1CWVW#aU^m>kB z>`nqrkuU;Z_V9+QW~fA0=9vg3zVm)( z6iT#ZP@nbVr}zSI@Of5;F7wq&8kq;BJOO6z*-Y*6K#yihm82)uGu|aRY1#C$L>M|> z=&kURnCN<}qI5m?@WiHvgc??tOsAJNX6v>Uq|z+IQs|XIxj6Sq2^$Jd$-Qwct7&R- zqeYg%4?{hgjDm6A)@hMZ`AnLiz`KgeIl0JI2DuJBs?qB`xwLpr$7>MsiL=k2Me#N_ z%R+KaGZk8qG0RD>r@AAxbyI)_ubfPe(er0`!`@NoG%6D5(^P^oE59ztZX=d1C4U4% zk^43tYEDFT5&3(FkDF)$%wCR z@Y=J~3Cm|$WMusjJ5*DxS6Z2VUQRcNWJ?r@$%kFiA24vvpvq+CN`X?aChR0H^&L{1 z4f!W&+9|Sf%|i5ktvDu*A%mDRgO41ZtZK#WMa$6EBo^HuR=E)>lmXn@icz=_i!SZf z8ry_|u^k`r$rb_mYWQJP?6LhTmHcwtU`Ut>>^z~gzO95BG6Y!-Gxu<7O!fM?XF{9U z#Hm8UT1#d8{x_QqJijsA8Ha`wI5&>aFE$(fA=PG#hRp^|W^Sq{6WK+tQev`|6_$LZ zg=)*``J;BL8QOeKRr~F539-B26+oL076$ed&j03f>qa#EyVeRu*3zD>Ruu{+98~fj zaN0MWMSb=TCGNUk^TiH C*E^{I literal 0 HcmV?d00001 diff --git a/aws_auth.tf b/aws_auth.tf index e2aac0e0fc..db6dea4708 100644 --- a/aws_auth.tf +++ b/aws_auth.tf @@ -48,13 +48,13 @@ locals { { rolearn = role["worker_role_arn"] username = "system:node:{{EC2PrivateDNSName}}" - groups = concat( + groups = tolist(concat( [ "system:bootstrappers", "system:nodes", ], role["platform"] == "windows" ? ["eks:kube-proxy-windows"] : [] - ) + )) } ] } From 756a1686cc37abe99d4457c0cb8ce900a577367d Mon Sep 17 00:00:00 2001 From: Jaroslav Keznikl Date: Thu, 23 Apr 2020 16:04:20 +0200 Subject: [PATCH 2/3] remove accidental swap file --- .aws_auth.tf.swp | Bin 12288 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .aws_auth.tf.swp diff --git a/.aws_auth.tf.swp b/.aws_auth.tf.swp deleted file mode 100644 index fdc2599dd3180dd72207e8c05c0f44daccbeceb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2&5ImG7{)7tpPQ&e1anH+yM$fI_I_wW7zn|vf*Lm@N<VMp2nwEzPxy-r*Zqur_wM_zT>JGnd+{;GI`TCYcM@v3>GjN+vg7RX>2nLm z{3H#<*g>yX0q2&|NX{9lwP>ZfJ1f@nS=q_wa1TUbF8Zc*)91NHr+`ynFA5xBk1j6E z)5uBhVgA6u3wsIT#yAC>0!{&^fK$LJ;1qBQI0c*nx2OUp+sC$$`)yVJ=d1g^k$d&4 zyEz4%0!{&^fK$LJ;1qBQI0c*nP64NYQ@|;33o0NY#@@P}u|MuW^7#LM{rCS*_c3-2 zTm{?U1Mn31;$Fr+0xj_80miO_U%(IGYw$7Xfi^e}d@v2Bz$BOem-jPv3>*eGCK!7g zYykr#XoAy#gZ<#=dlt90EIcGxj_94SWXP04?w`XaEi#1lxBp z_7%7cJ_nzIPr#etS#StE1SY`Fos9hmz6aajOYk9h2fPYi0_VXQa2V`B#~Xn3yiS_B z%PHU#a0)mD{$m9;8RrD&U6DN=hH0Tp&QJ0U(M_ZZaU^YeO=usDfv8$%>h2eEsdE}S zwtGRXW#95A=QH&O&g-B$O=N!5Mx;pgl$;-?suj2CnY)^!I5)8h%{1CWVW#aU^m>kB z>`nqrkuU;Z_V9+QW~fA0=9vg3zVm)( z6iT#ZP@nbVr}zSI@Of5;F7wq&8kq;BJOO6z*-Y*6K#yihm82)uGu|aRY1#C$L>M|> z=&kURnCN<}qI5m?@WiHvgc??tOsAJNX6v>Uq|z+IQs|XIxj6Sq2^$Jd$-Qwct7&R- zqeYg%4?{hgjDm6A)@hMZ`AnLiz`KgeIl0JI2DuJBs?qB`xwLpr$7>MsiL=k2Me#N_ z%R+KaGZk8qG0RD>r@AAxbyI)_ubfPe(er0`!`@NoG%6D5(^P^oE59ztZX=d1C4U4% zk^43tYEDFT5&3(FkDF)$%wCR z@Y=J~3Cm|$WMusjJ5*DxS6Z2VUQRcNWJ?r@$%kFiA24vvpvq+CN`X?aChR0H^&L{1 z4f!W&+9|Sf%|i5ktvDu*A%mDRgO41ZtZK#WMa$6EBo^HuR=E)>lmXn@icz=_i!SZf z8ry_|u^k`r$rb_mYWQJP?6LhTmHcwtU`Ut>>^z~gzO95BG6Y!-Gxu<7O!fM?XF{9U z#Hm8UT1#d8{x_QqJijsA8Ha`wI5&>aFE$(fA=PG#hRp^|W^Sq{6WK+tQev`|6_$LZ zg=)*``J;BL8QOeKRr~F539-B26+oL076$ed&j03f>qa#EyVeRu*3zD>Ruu{+98~fj zaN0MWMSb=TCGNUk^TiH C*E^{I From 1a5b520458e926f3f33fc835b272c5f848974290 Mon Sep 17 00:00:00 2001 From: Jaroslav Keznikl Date: Thu, 23 Apr 2020 16:04:20 +0200 Subject: [PATCH 3/3] remove accidental swap file --- .aws_auth.tf.swp | Bin 12288 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .aws_auth.tf.swp diff --git a/.aws_auth.tf.swp b/.aws_auth.tf.swp deleted file mode 100644 index fdc2599dd3180dd72207e8c05c0f44daccbeceb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2&5ImG7{)7tpPQ&e1anH+yM$fI_I_wW7zn|vf*Lm@N<VMp2nwEzPxy-r*Zqur_wM_zT>JGnd+{;GI`TCYcM@v3>GjN+vg7RX>2nLm z{3H#<*g>yX0q2&|NX{9lwP>ZfJ1f@nS=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