Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/ipi-deprovision/ipi-deprovision.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I don't think we want to run POSIX shell. If we have bash, let's use it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. CP/Paste error.


if [ -z "${AWS_SHARED_CREDENTIALS_FILE}" ]; then echo "ENV VAR AWS_SHARED_CREDENTIALS_FILE is not set"; exit 1; fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: prefer

if [[ -z "${AWS_SHARED_CREDENTIALS_FILE:-}" ]]; then
    echo "Required variable \$AWS_SHARED_CREDENTIALS_FILE unset"
    exit 1
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can't we just omit this? The AWS library will fail when no credentials are found, and this script could be used locally with the credentials in $HOME

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted.


### expirationDate is always with timezone +00:00, eg, "2019-07-23T22:35+0000"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is out of place

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved a bit.

MY_DATE=$(TZ=":Africa/Abidjan" date '+%Y-%m-%d')
declare -a regions=("us-east-1" "us-east-2" "us-west-1")
Expand Down