diff --git a/bin/find_binary.sh b/bin/find_binary.sh new file mode 100755 index 0000000..64dfc43 --- /dev/null +++ b/bin/find_binary.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +#set -e +eval "$(jq -r '@sh "PROGRAM=\(.program)"')" + +bin_path=$(which $PROGRAM 2> /dev/null) +status=$? + +if [ $status == 0 ] +then + if [ ! -x $bin_path ] + then + status=1 + fi +fi + +jq -n --arg bin_path "$bin_path" --arg status "$status" '{"path":$bin_path,"status":$status | tonumber}' diff --git a/outputs.tf b/outputs.tf new file mode 100644 index 0000000..a8b899a --- /dev/null +++ b/outputs.tf @@ -0,0 +1,9 @@ +output "role_arn" { + description = "Created role ARN" + value = aws_iam_role.role.arn +} + +output "role_name" { + description = "Created role name" + value = aws_iam_role.role.name +}