File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 22
33cluster_name=$( terraform output -raw eks_cluster_name)
44principal_arn=$( aws eks list-access-entries --cluster-name ${cluster_name} | jq -r ' .accessEntries[]' | grep mcp-tenantOperator | head -n 1)
5- policy_arn=$( aws eks list-associated-access-policies --cluster-name uads-venue-dev-jupyter --principal-arn ${principal_arn} | jq -r .associatedAccessPolicies[0].policyArn)
5+ policy_arn=$( aws eks list-associated-access-policies --cluster-name ${cluster_name} --principal-arn ${principal_arn} | jq -r .associatedAccessPolicies[0].policyArn)
66
77echo " cluster_name=${cluster_name} "
88echo " principal_arn=${principal_arn} "
99echo " policy_arn=${policy_arn} "
1010
11+ if [ -z " $principal_arn " ]; then
12+ echo " No value determined for principal_arn"
13+ exit 1
14+ fi
15+
16+ if [ -z " $policy_arn " ]; then
17+ echo " No value determined for policy_arn"
18+ exit 1
19+ fi
20+
21+ echo " Waiting 5 seconds for you to abort..."
22+ sleep 5
23+
1124terraform import ' module.eks.aws_eks_access_entry.this["cluster_creator"]' " ${cluster_name} :${principal_arn} "
1225terraform import ' module.eks.aws_eks_access_policy_association.this["cluster_creator_admin"]' " ${cluster_name} #${principal_arn} #${policy_arn} "
You can’t perform that action at this time.
0 commit comments