From 6bdc687cc73f55c80dd67a94b1daaa90aee803af Mon Sep 17 00:00:00 2001 From: AJ Bowen Date: Sat, 27 Mar 2021 19:12:30 +0100 Subject: [PATCH] Remove partial teardown command --- bin/sa-can-read-s3.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sa-can-read-s3.sh b/bin/sa-can-read-s3.sh index 74499788..a6d001de 100755 --- a/bin/sa-can-read-s3.sh +++ b/bin/sa-can-read-s3.sh @@ -25,7 +25,7 @@ emit_describe_cluster_policy() { create_describe_cluster_policy() { local role_name="can-describe-cluster" aws iam create-policy \ - --policy-name "${role_name}" \ + --policy-name can-describe-cluster \ --description "Policy allowing to describe ${CLUSTER_NAME}" \ --policy-document "$(emit_describe_cluster_policy)" @@ -87,9 +87,9 @@ update_kubeconfig() { } teardown() { + # see also 'can-describe-cluster' policy, if created via create_describe_cluster_policy aws iam detach-role-policy --policy-arn "${S3_POLICY_ARN}" --role-name "${ROLE_NAME}" aws iam delete-role "${ROLE_NAME}" - aws iam delete-policy --policy-arn } create_and_populate_bucket() {