Example of inter-conversion between datetime string and Unixtime in Terraform.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Output aws cli command in bash script | |
# Usage: echo-awscli.sh scriptPath [arg1 arg2 ...] | |
shopt -s expand_aliases | |
# mocks | |
function aws_cli_mock() { | |
case $@ in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Manage Data Additional Information", | |
"description": null, | |
"permissions": "PUBLIC_READ_WRITE", | |
"pages": [ | |
{ | |
"name": "Ingest Resource Request Per Minute", | |
"description": null, | |
"widgets": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# aws-cloudshell-cred.sh | |
# Get the credentials from AWS CloudShell and output to credential file format. | |
CONTAINER_CREDENTIALS=$(curl -sSf -H "Authorization: ${AWS_CONTAINER_AUTHORIZATION_TOKEN}" "${AWS_CONTAINER_CREDENTIALS_FULL_URI}") | |
if [ $? -ne 0 ]; then | |
echo "failed get container credentials." | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fetch resource counts of HPC Terraform | |
* | |
* Usage: | |
* - Run the `setUserPreference` function to register your API_TOKEN and ORGANIZATION in the script's properties. | |
* - You can verify the stored properties using the log output of the `getUserPreference` function. | |
* - Set a periodic trigger to execute the "getTerraformData" function. | |
*/ | |
const BASE_URL = "https://app.terraform.io/api/v2"; |
OlderNewer