Merge branch '2.7' into fix_#938_assume_role

This commit is contained in:
Toni de la Fuente authored and GitHub committed 2021-12-01 12:47:08 +01:00
commit 0b92aeca4c
10 files changed
+207 -15

No files matched your search

+2 -7
View File
@@ -11,15 +11,10 @@
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
# both variables are mandatory to be set together
assume_role(){
echo ASSUMING ROLE...
PROFILE_OPT=$PROFILE_OPT_BAK
echo PROFILE $PROFILE
echo PROFILE_OPT $PROFILE_OPT
if [[ -z $ROLE_TO_ASSUME ]]; then
# Both variables are mandatory to be set together
if [[ -z $ROLE_TO_ASSUME || -z $ACCOUNT_TO_ASSUME ]]; then
echo "$OPTRED ERROR!$OPTNORMAL - Both Account ID (-A) and IAM Role to assume (-R) must be set"
exit 1
fi