From 0e27840d1b93a4abe413ee361480617d130745fb Mon Sep 17 00:00:00 2001 From: badra001 Date: Mon, 1 Mar 2021 15:17:59 -0500 Subject: [PATCH] add bin/, outputs.tf --- bin/find_binary.sh | 17 +++++++++++++++++ outputs.tf | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100755 bin/find_binary.sh create mode 100644 outputs.tf 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 +}