Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions zsh/functions/linux-dev.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ec2-linux() {
local tmp_key_created=false
local key_path=""
if [[ -z "$key_name" ]]; then
key_name="ec2-linux-tmp-$(date +%s)-${RANDOM}"
key_name="ec2-linux-tmp-${EPOCHSECONDS}-${RANDOM}"
key_path="${TMPDIR:-/tmp}/${key_name}.pem"
echo "${BLUE}INFO${NC}: Creating temporary key pair: $key_name"
if ! aws ec2 create-key-pair --region "$region" \
Expand Down Expand Up @@ -182,7 +182,7 @@ ec2-linux() {
fi

# --- Security group (SSH only from my IP) ---
local sg_name="ec2-linux-dev-$(date +%s)-${RANDOM}"
local sg_name="ec2-linux-dev-${EPOCHSECONDS}-${RANDOM}"
local sg_id
sg_id=$(aws ec2 create-security-group \
--region "$region" \
Expand Down Expand Up @@ -385,7 +385,7 @@ az-linux() {
fi

# Use a unique resource group so cleanup is just deleting the group
local rg_name="az-linux-dev-$(date +%s)-${RANDOM}"
local rg_name="az-linux-dev-${EPOCHSECONDS}-${RANDOM}"
local vm_name="az-linux-dev"

# --- Temporary SSH key ---
Expand Down Expand Up @@ -589,7 +589,7 @@ gcp-linux() {
esac
fi

local instance_name="gcp-linux-dev-$(date +%s)-${RANDOM}"
local instance_name="gcp-linux-dev-${EPOCHSECONDS}-${RANDOM}"

# --- Temporary SSH key ---
local key_path="${TMPDIR:-/tmp}/${instance_name}"
Expand Down
2 changes: 1 addition & 1 deletion zsh/functions/s3/s3-minio-aws.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ configure-minio-cluster-access() {
# Test connectivity from cluster
echo "${BLUE}INFO${NC}: Testing connectivity from cluster to MinIO..."

local test_pod_name="minio-test-$(date +%s)"
local test_pod_name="minio-test-${EPOCHSECONDS}"
local test_manifest
test_manifest=$(cat << EOF
apiVersion: v1
Expand Down